resources

package
v0.0.0-...-5d45249 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(r Resource) bool

func Fetch

func Fetch(ctx context.Context, objects ...Fetchable) error

func Sync

func Sync(ctx context.Context, objects ...Syncable) error

Types

type CABundle

type CABundle struct {
	ConfigMapName string
	VolumeName    string
	MountPath     string
}

CABundle represents mounted configmap with trusted certificates

func NewCABundle

func NewCABundle(configMapName string, volumeName string, mountPath string) *CABundle

func (*CABundle) AddVolume

func (t *CABundle) AddVolume(podSpec *corev1.PodSpec)

func (*CABundle) AddVolumeMount

func (t *CABundle) AddVolumeMount(container *corev1.Container)

type ConfigMap

type ConfigMap struct {
	// contains filtered or unexported fields
}

func NewConfigMap

func NewConfigMap(name string, labeller *labeller2.Labeller, apiProxy apiproxy.APIProxy) *ConfigMap

func (*ConfigMap) Build

func (s *ConfigMap) Build() *corev1.ConfigMap

func (*ConfigMap) Fetch

func (s *ConfigMap) Fetch(ctx context.Context) error

func (*ConfigMap) Name

func (s *ConfigMap) Name() string

func (*ConfigMap) OldObject

func (s *ConfigMap) OldObject() client.Object

func (*ConfigMap) Sync

func (s *ConfigMap) Sync(ctx context.Context) error

type Deployment

type Deployment struct {
	// 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) Fetch

func (d *Deployment) Fetch(ctx context.Context) error

func (*Deployment) Name

func (d *Deployment) Name() string

func (*Deployment) NeedSync

func (d *Deployment) NeedSync(replicas int32) bool

func (*Deployment) OldObject

func (d *Deployment) OldObject() client.Object

func (*Deployment) Sync

func (d *Deployment) Sync(ctx context.Context) error

type Fetchable

type Fetchable interface {
	Fetch(ctx context.Context) error
}

type HTTPService

type HTTPService struct {
	// 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) Fetch

func (s *HTTPService) Fetch(ctx context.Context) error

func (*HTTPService) Name

func (s *HTTPService) Name() string

func (*HTTPService) OldObject

func (s *HTTPService) OldObject() client.Object

func (*HTTPService) SetHttpNodePort

func (s *HTTPService) SetHttpNodePort(port *int32)

func (*HTTPService) SetHttpsNodePort

func (s *HTTPService) SetHttpsNodePort(port *int32)

func (*HTTPService) Sync

func (s *HTTPService) Sync(ctx context.Context) error

type HeadlessService

type HeadlessService struct {
	// contains filtered or unexported fields
}

func NewHeadlessService

func NewHeadlessService(name string, labeller *labeller2.Labeller, apiProxy apiproxy.APIProxy) *HeadlessService

func (*HeadlessService) Build

func (s *HeadlessService) Build() *corev1.Service

func (*HeadlessService) Fetch

func (s *HeadlessService) Fetch(ctx context.Context) error

func (*HeadlessService) Name

func (s *HeadlessService) Name() string

func (*HeadlessService) OldObject

func (s *HeadlessService) OldObject() client.Object

func (*HeadlessService) Sync

func (s *HeadlessService) Sync(ctx context.Context) error

type Job

type Job struct {
	// contains filtered or unexported fields
}

func NewJob

func NewJob(name string, l *labeller.Labeller, apiProxy apiproxy.APIProxy) *Job

func (*Job) Build

func (j *Job) Build() *batchv1.Job

func (*Job) Completed

func (j *Job) Completed() bool

func (*Job) Fetch

func (j *Job) Fetch(ctx context.Context) error

func (*Job) Name

func (j *Job) Name() string

func (*Job) OldObject

func (j *Job) OldObject() client.Object

func (*Job) Sync

func (j *Job) Sync(ctx context.Context) error

type MonitoringService

type MonitoringService struct {
	// contains filtered or unexported fields
}

func NewMonitoringService

func NewMonitoringService(monitoringTargetPort int32, labeller *labeller2.Labeller, apiProxy apiproxy.APIProxy) *MonitoringService

func (*MonitoringService) Build

func (s *MonitoringService) Build() *corev1.Service

func (*MonitoringService) Fetch

func (s *MonitoringService) Fetch(ctx context.Context) error

func (*MonitoringService) GetServiceMeta

func (s *MonitoringService) GetServiceMeta(name string) metav1.ObjectMeta

func (*MonitoringService) Name

func (s *MonitoringService) Name() string

func (*MonitoringService) OldObject

func (s *MonitoringService) OldObject() client.Object

func (*MonitoringService) Service

func (s *MonitoringService) Service() corev1.Service

func (*MonitoringService) Sync

func (s *MonitoringService) Sync(ctx context.Context) error

type RPCService

type RPCService struct {
	// contains filtered or unexported fields
}

func NewRPCService

func NewRPCService(name string, labeller *labeller.Labeller, apiProxy apiproxy.APIProxy) *RPCService

func (*RPCService) Build

func (s *RPCService) Build() *corev1.Service

func (*RPCService) Fetch

func (s *RPCService) Fetch(ctx context.Context) error

func (*RPCService) Name

func (s *RPCService) Name() string

func (*RPCService) OldObject

func (s *RPCService) OldObject() client.Object

func (*RPCService) Service

func (s *RPCService) Service() corev1.Service

func (*RPCService) SetNodePort

func (s *RPCService) SetNodePort(port *int32)

func (*RPCService) Sync

func (s *RPCService) Sync(ctx context.Context) error

type Resource

type Resource interface {
	OldObject() client.Object
}

type StatefulSet

type StatefulSet struct {
	// 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 (s *StatefulSet) ArePodsReady(ctx context.Context, minReadyInstanceCount *int) bool

func (*StatefulSet) ArePodsRemoved

func (s *StatefulSet) ArePodsRemoved(ctx context.Context) bool

func (*StatefulSet) Build

func (s *StatefulSet) Build() *appsv1.StatefulSet

func (*StatefulSet) Fetch

func (s *StatefulSet) Fetch(ctx context.Context) error

func (*StatefulSet) Name

func (s *StatefulSet) Name() string

func (*StatefulSet) NeedSync

func (s *StatefulSet) NeedSync(replicas int32) bool

func (*StatefulSet) OldObject

func (s *StatefulSet) OldObject() client.Object

func (*StatefulSet) Sync

func (s *StatefulSet) Sync(ctx context.Context) error

type StringSecret

type StringSecret struct {
	// contains filtered or unexported fields
}

func NewStringSecret

func NewStringSecret(name string, reconciler *labeller.Labeller, apiProxy apiproxy.APIProxy) *StringSecret

func (*StringSecret) Build

func (s *StringSecret) Build() *corev1.Secret

func (*StringSecret) Fetch

func (s *StringSecret) Fetch(ctx context.Context) error

func (*StringSecret) GetEnvSource

func (s *StringSecret) GetEnvSource() corev1.EnvFromSource

func (*StringSecret) GetValue

func (s *StringSecret) GetValue(key string) (string, bool)

func (*StringSecret) Name

func (s *StringSecret) Name() string

func (*StringSecret) NeedSync

func (s *StringSecret) NeedSync(key, value string) bool

func (*StringSecret) OldObject

func (s *StringSecret) OldObject() client.Object

func (*StringSecret) Sync

func (s *StringSecret) Sync(ctx context.Context) error

type Syncable

type Syncable interface {
	Sync(ctx context.Context) error
}

type TCPService

type TCPService struct {
	// 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

func (*TCPService) Fetch

func (s *TCPService) Fetch(ctx context.Context) error

func (*TCPService) Name

func (s *TCPService) Name() string

func (*TCPService) OldObject

func (s *TCPService) OldObject() client.Object

func (*TCPService) Service

func (s *TCPService) Service() corev1.Service

func (*TCPService) Sync

func (s *TCPService) Sync(ctx context.Context) error

type TLSSecret

type TLSSecret struct {
	SecretName string
	VolumeName string
	MountPath  string
}

TLSSecret represents mounted kubernetes.io/tls secret https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets

func NewTLSSecret

func NewTLSSecret(secretName string, volumeName string, mountPath string) *TLSSecret

func (*TLSSecret) AddVolume

func (t *TLSSecret) AddVolume(podSpec *corev1.PodSpec)

func (*TLSSecret) AddVolumeMount

func (t *TLSSecret) AddVolumeMount(container *corev1.Container)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL