Documentation ¶
Index ¶
- Constants
- func NewMutator(mgr manager.Manager, ensurer Ensurer, unitSerializer utils.UnitSerializer, ...) extensionswebhook.Mutator
- type Ensurer
- type NoopEnsurer
- func (e *NoopEnsurer) EnsureAdditionalFiles(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureAdditionalProvisionFiles(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureAdditionalProvisionUnits(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureAdditionalUnits(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureCRIConfig(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureClusterAutoscalerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureETCD(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureKubeAPIServerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureKubeControllerManagerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureKubeSchedulerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureKubeletCloudProviderConfig(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version, ...) error
- func (e *NoopEnsurer) EnsureKubeletConfiguration(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version, ...) error
- func (e *NoopEnsurer) EnsureKubeletServiceUnitOptions(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version, ...) ([]*unit.UnitOption, error)
- func (e *NoopEnsurer) EnsureKubernetesGeneralConfiguration(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *string) error
- func (e *NoopEnsurer) EnsureMachineControllerManagerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureMachineControllerManagerVPA(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) EnsureVPNSeedServerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, ...) error
- func (e *NoopEnsurer) ShouldProvisionKubeletCloudProviderConfig(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version) bool
Constants ¶
const CloudProviderConfigPath = "/var/lib/kubelet/cloudprovider.conf"
CloudProviderConfigPath is the path to the cloudprovider.conf kubelet configuration file.
Variables ¶
This section is empty.
Functions ¶
func NewMutator ¶
func NewMutator( mgr manager.Manager, ensurer Ensurer, unitSerializer utils.UnitSerializer, kubeletConfigCodec kubelet.ConfigCodec, fciCodec utils.FileContentInlineCodec, logger logr.Logger, ) extensionswebhook.Mutator
NewMutator creates a new controlplane mutator.
Types ¶
type Ensurer ¶
type Ensurer interface { // EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureKubeAPIServerDeployment(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *appsv1.Deployment) error // EnsureKubeControllerManagerDeployment ensures that the kube-controller-manager deployment conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureKubeControllerManagerDeployment(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *appsv1.Deployment) error // EnsureKubeSchedulerDeployment ensures that the kube-scheduler deployment conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureKubeSchedulerDeployment(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *appsv1.Deployment) error // EnsureClusterAutoscalerDeployment ensures that the cluster-autoscaler deployment conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureClusterAutoscalerDeployment(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *appsv1.Deployment) error // EnsureMachineControllerManagerDeployment ensures that the machine-controller-manager deployment conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureMachineControllerManagerDeployment(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *appsv1.Deployment) error // EnsureMachineControllerManagerVPA ensures that the machine-controller-manager VPA settings conform to the provider requirements. // "old" might be "nil" and must always be checked. EnsureMachineControllerManagerVPA(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *vpaautoscalingv1.VerticalPodAutoscaler) error // EnsureETCD ensures that the etcds conform to the respective provider requirements. // "old" might be "nil" and must always be checked. EnsureETCD(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *druidv1alpha1.Etcd) error // EnsureVPNSeedServerDeployment ensures that the vpn-seed-server deployment conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureVPNSeedServerDeployment(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *appsv1.Deployment) error // EnsureKubeletServiceUnitOptions ensures that the kubelet.service unit options conform to the provider requirements. EnsureKubeletServiceUnitOptions(ctx context.Context, gctx extensionscontextwebhook.GardenContext, kubeletVersion *semver.Version, new, old []*unit.UnitOption) ([]*unit.UnitOption, error) // EnsureKubeletConfiguration ensures that the kubelet configuration conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureKubeletConfiguration(ctx context.Context, gctx extensionscontextwebhook.GardenContext, kubeletVersion *semver.Version, new, old *kubeletconfigv1beta1.KubeletConfiguration) error // ShouldProvisionKubeletCloudProviderConfig returns true if the cloud provider config file should be added to the kubelet configuration. ShouldProvisionKubeletCloudProviderConfig(ctx context.Context, gctx extensionscontextwebhook.GardenContext, kubeletVersion *semver.Version) bool // EnsureKubeletCloudProviderConfig ensures that the cloud provider config file content conforms to the provider requirements. EnsureKubeletCloudProviderConfig(ctx context.Context, gctx extensionscontextwebhook.GardenContext, kubeletVersion *semver.Version, configContent *string, namespace string) error // EnsureKubernetesGeneralConfiguration ensures that the kubernetes general configuration conforms to the provider requirements. // "old" might be "nil" and must always be checked. EnsureKubernetesGeneralConfiguration(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *string) error // EnsureAdditionalUnits ensures additional systemd units // "old" might be "nil" and must always be checked. EnsureAdditionalUnits(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *[]extensionsv1alpha1.Unit) error // EnsureAdditionalFiles ensures additional systemd files // "old" might be "nil" and must always be checked. EnsureAdditionalFiles(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *[]extensionsv1alpha1.File) error // EnsureAdditionalProvisionUnits ensures additional systemd units for the 'provision' OSC // "old" might be "nil" and must always be checked. EnsureAdditionalProvisionUnits(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *[]extensionsv1alpha1.Unit) error // EnsureAdditionalProvisionFiles ensures additional systemd files for the 'provision' OSC // "old" might be "nil" and must always be checked. EnsureAdditionalProvisionFiles(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *[]extensionsv1alpha1.File) error // EnsureCRIConfig ensures the CRI config. // "old" might be "nil" and must always be checked. EnsureCRIConfig(ctx context.Context, gctx extensionscontextwebhook.GardenContext, new, old *extensionsv1alpha1.CRIConfig) error }
Ensurer ensures that various standard Kubernetes control plane 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) EnsureAdditionalFiles ¶
func (e *NoopEnsurer) EnsureAdditionalFiles(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *[]extensionsv1alpha1.File) error
EnsureAdditionalFiles ensures that additional required system files are added.
func (*NoopEnsurer) EnsureAdditionalProvisionFiles ¶ added in v1.85.0
func (e *NoopEnsurer) EnsureAdditionalProvisionFiles(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *[]extensionsv1alpha1.File) error
EnsureAdditionalProvisionFiles ensures that additional required system files are added.
func (*NoopEnsurer) EnsureAdditionalProvisionUnits ¶ added in v1.85.0
func (e *NoopEnsurer) EnsureAdditionalProvisionUnits(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *[]extensionsv1alpha1.Unit) error
EnsureAdditionalProvisionUnits ensures that additional required system units are added.
func (*NoopEnsurer) EnsureAdditionalUnits ¶
func (e *NoopEnsurer) EnsureAdditionalUnits(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *[]extensionsv1alpha1.Unit) error
EnsureAdditionalUnits ensures that additional required system units are added.
func (*NoopEnsurer) EnsureCRIConfig ¶ added in v1.100.0
func (e *NoopEnsurer) EnsureCRIConfig(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *extensionsv1alpha1.CRIConfig) error
EnsureCRIConfig ensures the CRI config.
func (*NoopEnsurer) EnsureClusterAutoscalerDeployment ¶ added in v1.48.0
func (e *NoopEnsurer) EnsureClusterAutoscalerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *appsv1.Deployment) error
EnsureClusterAutoscalerDeployment ensures that the cluster-autoscaler deployment conforms to the provider requirements.
func (*NoopEnsurer) EnsureETCD ¶
func (e *NoopEnsurer) EnsureETCD(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *druidv1alpha1.Etcd) error
EnsureETCD ensures that the etcd stateful sets conform to the provider requirements.
func (*NoopEnsurer) EnsureKubeAPIServerDeployment ¶
func (e *NoopEnsurer) EnsureKubeAPIServerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *appsv1.Deployment) error
EnsureKubeAPIServerDeployment ensures that the kube-apiserver deployment conforms to the provider requirements.
func (*NoopEnsurer) EnsureKubeControllerManagerDeployment ¶
func (e *NoopEnsurer) EnsureKubeControllerManagerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *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, _ extensionscontextwebhook.GardenContext, _, _ *appsv1.Deployment) error
EnsureKubeSchedulerDeployment ensures that the kube-scheduler deployment conforms to the provider requirements.
func (*NoopEnsurer) EnsureKubeletCloudProviderConfig ¶
func (e *NoopEnsurer) EnsureKubeletCloudProviderConfig(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version, _ *string, _ string) error
EnsureKubeletCloudProviderConfig ensures that the cloud provider config file conforms to the provider requirements.
func (*NoopEnsurer) EnsureKubeletConfiguration ¶
func (e *NoopEnsurer) EnsureKubeletConfiguration(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version, _, _ *kubeletconfigv1beta1.KubeletConfiguration) error
EnsureKubeletConfiguration ensures that the kubelet configuration conforms to the provider requirements.
func (*NoopEnsurer) EnsureKubeletServiceUnitOptions ¶
func (e *NoopEnsurer) EnsureKubeletServiceUnitOptions(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version, new, _ []*unit.UnitOption) ([]*unit.UnitOption, error)
EnsureKubeletServiceUnitOptions ensures that the kubelet.service unit options conform to the provider requirements.
func (*NoopEnsurer) EnsureKubernetesGeneralConfiguration ¶
func (e *NoopEnsurer) EnsureKubernetesGeneralConfiguration(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *string) error
EnsureKubernetesGeneralConfiguration ensures that the kubernetes general configuration conforms to the provider requirements.
func (*NoopEnsurer) EnsureMachineControllerManagerDeployment ¶ added in v1.73.0
func (e *NoopEnsurer) EnsureMachineControllerManagerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *appsv1.Deployment) error
EnsureMachineControllerManagerDeployment ensures that the machine-controller-manager deployment conforms to the provider requirements.
func (*NoopEnsurer) EnsureMachineControllerManagerVPA ¶ added in v1.73.0
func (e *NoopEnsurer) EnsureMachineControllerManagerVPA(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *vpaautoscalingv1.VerticalPodAutoscaler) error
EnsureMachineControllerManagerVPA ensures that the machine-controller-manager deployment conforms to the provider requirements.
func (*NoopEnsurer) EnsureVPNSeedServerDeployment ¶ added in v1.30.0
func (e *NoopEnsurer) EnsureVPNSeedServerDeployment(_ context.Context, _ extensionscontextwebhook.GardenContext, _, _ *appsv1.Deployment) error
EnsureVPNSeedServerDeployment ensures that the vpn-seed-server deployment conforms to the provider requirements.
func (*NoopEnsurer) ShouldProvisionKubeletCloudProviderConfig ¶
func (e *NoopEnsurer) ShouldProvisionKubeletCloudProviderConfig(_ context.Context, _ extensionscontextwebhook.GardenContext, _ *semver.Version) bool
ShouldProvisionKubeletCloudProviderConfig returns if the cloud provider config file should be added to the kubelet configuration.