genericmutator

package
v0.0.0-...-6c6f41e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMutator

func NewMutator(ensurer Ensurer, unitSerializer controlplane.UnitSerializer, kubeletConfigCodec controlplane.KubeletConfigCodec, logger logr.Logger) controlplane.Mutator

NewMutator creates a new controlplane mutator.

Types

type Ensurer

type Ensurer interface {
	// EnsureKubeAPIServerService ensures that the kube-apiserver service conforms to the provider requirements.
	EnsureKubeAPIServerService(context.Context, *corev1.Service) error
	// EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements.
	EnsureKubeAPIServerDeployment(context.Context, *appsv1.Deployment) error
	// EnsureKubeControllerManagerDeployment ensures that the kube-controller-manager deployment conforms to the provider requirements.
	EnsureKubeControllerManagerDeployment(context.Context, *appsv1.Deployment) error
	// EnsureKubeSchedulerDeployment ensures that the kube-scheduler deployment conforms to the provider requirements.
	EnsureKubeSchedulerDeployment(context.Context, *appsv1.Deployment) error
	// EnsureETCDStatefulSet ensures that the etcd stateful sets conform to the provider requirements.
	EnsureETCDStatefulSet(context.Context, *appsv1.StatefulSet, *extensionscontroller.Cluster) error
	// EnsureKubeletServiceUnitOptions ensures that the kubelet.service unit options conform to the provider requirements.
	EnsureKubeletServiceUnitOptions(context.Context, []*unit.UnitOption) ([]*unit.UnitOption, error)
	// EnsureKubeletConfiguration ensures that the kubelet configuration conforms to the provider requirements.
	EnsureKubeletConfiguration(context.Context, *kubeletconfigv1beta1.KubeletConfiguration) error
}

Ensurer ensures that various standard Kubernets controlplane objects conform to the provider requirements. If they don't initially, they are mutated accordingly.

type NoopEnsurer

type NoopEnsurer struct{}

NoopEnsurer provides no-op implementation of Ensurer. This can be anonymously composed by actual Ensurers for convenience.

func (*NoopEnsurer) EnsureETCDStatefulSet

EnsureETCDStatefulSet ensures that the etcd stateful sets conform to the provider requirements.

func (*NoopEnsurer) EnsureKubeAPIServerDeployment

func (e *NoopEnsurer) EnsureKubeAPIServerDeployment(context.Context, *appsv1.Deployment) error

EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements.

func (*NoopEnsurer) EnsureKubeAPIServerService

func (e *NoopEnsurer) EnsureKubeAPIServerService(context.Context, *corev1.Service) error

EnsureKubeAPIServerService ensures that the kube-apiserver service conforms to the provider requirements.

func (*NoopEnsurer) EnsureKubeControllerManagerDeployment

func (e *NoopEnsurer) EnsureKubeControllerManagerDeployment(context.Context, *appsv1.Deployment) error

EnsureKubeControllerManagerDeployment ensures that the kube-controller-manager deployment conforms to the provider requirements.

func (*NoopEnsurer) EnsureKubeSchedulerDeployment

func (e *NoopEnsurer) EnsureKubeSchedulerDeployment(context.Context, *appsv1.Deployment) error

EnsureKubeSchedulerDeployment ensures that the kube-scheduler deployment conforms to the provider requirements.

func (*NoopEnsurer) EnsureKubeletConfiguration

func (e *NoopEnsurer) EnsureKubeletConfiguration(context.Context, *kubeletconfigv1beta1.KubeletConfiguration) error

EnsureKubeletConfiguration ensures that the kubelet configuration conforms to the provider requirements.

func (*NoopEnsurer) EnsureKubeletServiceUnitOptions

func (e *NoopEnsurer) EnsureKubeletServiceUnitOptions(_ context.Context, opts []*unit.UnitOption) ([]*unit.UnitOption, error)

EnsureKubeletServiceUnitOptions ensures that the kubelet.service unit options conform to the provider requirements.

Jump to

Keyboard shortcuts

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