Documentation
¶
Index ¶
- func Exists(objects ...Fetchable) bool
- func Fetch(ctx context.Context, objects ...Fetchable) error
- func GetDaemonSetStatus(ds *appsv1.DaemonSet) (ready bool, message string)
- func Hash(items ...any) (string, error)
- func Sync(ctx context.Context, objects ...Syncable) error
- type BaseManagedResource
- func (r *BaseManagedResource[T]) Exists() bool
- func (r *BaseManagedResource[T]) Fetch(ctx context.Context) error
- func (r *BaseManagedResource[T]) IsAnnotationChanged(ann string) bool
- func (r *BaseManagedResource[T]) IsUpdated() bool
- func (r *BaseManagedResource[T]) Name() string
- func (r *BaseManagedResource[T]) NewObject() T
- func (r *BaseManagedResource[T]) OldObject() T
- func (r *BaseManagedResource[T]) Sync(ctx context.Context) error
- type CABundle
- type ConfigMap
- type DaemonSet
- type Deployment
- type Fetchable
- type HTTPService
- func (s *HTTPService) Build() *corev1.Service
- func (s *HTTPService) SetChytProxyHttpNodePort(port *int32)
- func (s *HTTPService) SetChytProxyHttpPort(port *int32)
- func (s *HTTPService) SetChytProxyHttpsNodePort(port *int32)
- func (s *HTTPService) SetChytProxyHttpsPort(port *int32)
- func (s *HTTPService) SetHttpNodePort(port *int32)
- func (s *HTTPService) SetHttpPort(port *int32)
- func (s *HTTPService) SetHttpsNodePort(port *int32)
- func (s *HTTPService) SetHttpsPort(port *int32)
- type HeadlessService
- type Job
- type ManagedResource
- type MonitoringService
- type RPCService
- type ResourceObject
- type StatefulSet
- func (s *StatefulSet) ArePodsReady(ctx context.Context, instanceCount int, minReadyInstanceCount *int, ...) bool
- func (s *StatefulSet) ArePodsRemoved(ctx context.Context) bool
- func (s *StatefulSet) Build() *appsv1.StatefulSet
- func (s *StatefulSet) GetReplicas() int32
- func (s *StatefulSet) ListPods(ctx context.Context) ([]corev1.Pod, error)
- type StringSecret
- type Syncable
- type TCPService
- type TLSSecret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDaemonSetStatus ¶ added in v0.31.0
DaemonSet is ready when: - exists, not deleted, observed - pods for all desired nodes are updated, ready and available.
Types ¶
type BaseManagedResource ¶
type BaseManagedResource[T ResourceObject] struct { // contains filtered or unexported fields }
func (*BaseManagedResource[T]) Exists ¶
func (r *BaseManagedResource[T]) Exists() bool
func (*BaseManagedResource[T]) Fetch ¶
func (r *BaseManagedResource[T]) Fetch(ctx context.Context) error
func (*BaseManagedResource[T]) IsAnnotationChanged ¶ added in v0.31.0
func (r *BaseManagedResource[T]) IsAnnotationChanged(ann string) bool
func (*BaseManagedResource[T]) IsUpdated ¶
func (r *BaseManagedResource[T]) IsUpdated() bool
func (*BaseManagedResource[T]) Name ¶
func (r *BaseManagedResource[T]) Name() string
func (*BaseManagedResource[T]) NewObject ¶
func (r *BaseManagedResource[T]) NewObject() T
func (*BaseManagedResource[T]) OldObject ¶
func (r *BaseManagedResource[T]) OldObject() T
type CABundle ¶
type CABundle struct {
Source ytv1.FileObjectReference
VolumeName string
MountPath string
FileName string
}
CABundle represents mounted configmap with trusted certificates
func NewCABundle ¶
func NewCABundle(source *ytv1.FileObjectReference) *CABundle
func NewCARootBundle ¶
func NewCARootBundle(source *ytv1.FileObjectReference) *CABundle
func (*CABundle) AddContainerEnv ¶
func (*CABundle) AddVolumeMount ¶
type ConfigMap ¶
type ConfigMap struct {
BaseManagedResource[*corev1.ConfigMap]
}
func NewConfigMap ¶
type DaemonSet ¶ added in v0.31.0
type DaemonSet struct {
BaseManagedResource[*appsv1.DaemonSet]
}
func NewDaemonSet ¶ added in v0.31.0
type Deployment ¶
type Deployment struct {
BaseManagedResource[*appsv1.Deployment]
// contains filtered or unexported fields
}
func NewDeployment ¶
func NewDeployment( name string, labeller *labeller2.Labeller, ytsaurus *apiproxy.Ytsaurus, tolerations []corev1.Toleration, nodeSelector map[string]string, ) *Deployment
func (*Deployment) ArePodsReady ¶
func (d *Deployment) ArePodsReady(ctx context.Context) bool
func (*Deployment) ArePodsRemoved ¶
func (d *Deployment) ArePodsRemoved(ctx context.Context) bool
func (*Deployment) Build ¶
func (d *Deployment) Build() *appsv1.Deployment
func (*Deployment) GetReplicas ¶ added in v0.31.0
func (d *Deployment) GetReplicas() int32
type HTTPService ¶
type HTTPService struct {
BaseManagedResource[*corev1.Service]
// contains filtered or unexported fields
}
func NewHTTPService ¶
func NewHTTPService(name string, transport *ytv1.HTTPTransportSpec, labeller *labeller.Labeller, apiProxy apiproxy.APIProxy) *HTTPService
func (*HTTPService) Build ¶
func (s *HTTPService) Build() *corev1.Service
func (*HTTPService) SetChytProxyHttpNodePort ¶
func (s *HTTPService) SetChytProxyHttpNodePort(port *int32)
func (*HTTPService) SetChytProxyHttpPort ¶
func (s *HTTPService) SetChytProxyHttpPort(port *int32)
func (*HTTPService) SetChytProxyHttpsNodePort ¶
func (s *HTTPService) SetChytProxyHttpsNodePort(port *int32)
func (*HTTPService) SetChytProxyHttpsPort ¶
func (s *HTTPService) SetChytProxyHttpsPort(port *int32)
func (*HTTPService) SetHttpNodePort ¶
func (s *HTTPService) SetHttpNodePort(port *int32)
func (*HTTPService) SetHttpPort ¶
func (s *HTTPService) SetHttpPort(port *int32)
func (*HTTPService) SetHttpsNodePort ¶
func (s *HTTPService) SetHttpsNodePort(port *int32)
func (*HTTPService) SetHttpsPort ¶
func (s *HTTPService) SetHttpsPort(port *int32)
type HeadlessService ¶
type HeadlessService struct {
BaseManagedResource[*corev1.Service]
}
func NewHeadlessService ¶
func (*HeadlessService) Build ¶
func (s *HeadlessService) Build() *corev1.Service
type Job ¶
type Job struct {
BaseManagedResource[*batchv1.Job]
}
type ManagedResource ¶
type ManagedResource[T ResourceObject] interface { Fetchable Syncable Name() string OldObject() T NewObject() T Build() T }
type MonitoringService ¶
type MonitoringService struct {
BaseManagedResource[*corev1.Service]
// contains filtered or unexported fields
}
func NewMonitoringService ¶
func (*MonitoringService) AddPort ¶
func (s *MonitoringService) AddPort(port corev1.ServicePort)
func (*MonitoringService) Build ¶
func (s *MonitoringService) Build() *corev1.Service
func (*MonitoringService) GetServiceMeta ¶
func (s *MonitoringService) GetServiceMeta(name string) metav1.ObjectMeta
type RPCService ¶
type RPCService struct {
BaseManagedResource[*corev1.Service]
Ports []corev1.ServicePort
}
func NewRPCService ¶
func NewRPCService(name string, ports []corev1.ServicePort, labeller *labeller.Labeller, apiProxy apiproxy.APIProxy) *RPCService
func (*RPCService) Build ¶
func (s *RPCService) Build() *corev1.Service
type ResourceObject ¶
type StatefulSet ¶
type StatefulSet struct {
BaseManagedResource[*appsv1.StatefulSet]
// contains filtered or unexported fields
}
func NewStatefulSet ¶
func NewStatefulSet( name string, labeller *labeller2.Labeller, proxy apiproxy.APIProxy, commonSpec *ytv1.CommonSpec, ) *StatefulSet
func (*StatefulSet) ArePodsReady ¶
func (*StatefulSet) ArePodsRemoved ¶
func (s *StatefulSet) ArePodsRemoved(ctx context.Context) bool
func (*StatefulSet) Build ¶
func (s *StatefulSet) Build() *appsv1.StatefulSet
func (*StatefulSet) GetReplicas ¶ added in v0.31.0
func (s *StatefulSet) GetReplicas() int32
type StringSecret ¶
type StringSecret struct {
BaseManagedResource[*corev1.Secret]
}
func NewStringSecret ¶
func (*StringSecret) Build ¶
func (s *StringSecret) Build() *corev1.Secret
func (*StringSecret) GetEnvSource ¶
func (s *StringSecret) GetEnvSource() corev1.EnvFromSource
func (*StringSecret) NeedSync ¶
func (s *StringSecret) NeedSync(key, value string) bool
type TCPService ¶
type TCPService struct {
BaseManagedResource[*corev1.Service]
// contains filtered or unexported fields
}
func NewTCPService ¶
func NewTCPService(name string, serviceType corev1.ServiceType, portCount int32, minPort int32, labeller *labeller2.Labeller, apiProxy apiproxy.APIProxy) *TCPService
func (*TCPService) Build ¶
func (s *TCPService) Build() *corev1.Service
type TLSSecret ¶
TLSSecret represents mounted kubernetes.io/tls secret https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets
func NewTLSSecret ¶
func (*TLSSecret) AddVolumeMount ¶
Click to show internal directories.
Click to hide internal directories.