Documentation ¶
Index ¶
Constants ¶
const ( // HVPA enables simultaneous horizontal and vertical scaling in Seed Clusters. // owner @shreyas-s-rao @voelzmo // alpha: v0.31.0 HVPA featuregate.Feature = "HVPA" // HVPAForShootedSeed enables simultaneous horizontal and vertical scaling in shooted seed Clusters. // owner @shreyas-s-rao @voelzmo // alpha: v0.32.0 HVPAForShootedSeed featuregate.Feature = "HVPAForShootedSeed" // DefaultSeccompProfile defaults the seccomp profile for Gardener managed workload in the seed to RuntimeDefault. // owner: @dimityrmirchev // alpha: v1.54.0 DefaultSeccompProfile featuregate.Feature = "DefaultSeccompProfile" // CoreDNSQueryRewriting enables automatic DNS query rewriting in shoot cluster's CoreDNS to shortcut name resolution of // fully qualified in-cluster and out-of-cluster names, which follow a user-defined pattern. // owner: @ScheererJ @DockToFuture // alpha: v1.55.0 CoreDNSQueryRewriting featuregate.Feature = "CoreDNSQueryRewriting" // IPv6SingleStack allows creating shoot clusters with IPv6 single-stack networking (GEP-21). // owner: @timebertt // alpha: v1.63.0 IPv6SingleStack featuregate.Feature = "IPv6SingleStack" // MutableShootSpecNetworkingNodes allows updating the field `spec.networking.nodes`. // owner: @axel7born @ScheererJ @DockToFuture @kon-angelo // alpha: v1.64.0 MutableShootSpecNetworkingNodes featuregate.Feature = "MutableShootSpecNetworkingNodes" // WorkerlessShoots allows creation of Shoot clusters with no worker pools. // owner: @acumino @ary1992 @shafeeqes // alpha: v1.70.0 // beta: v1.79.0 // GA: v1.86.0 WorkerlessShoots featuregate.Feature = "WorkerlessShoots" // ShootForceDeletion allows force deletion of Shoots. // See https://github.com/gardener/gardener/blob/master/docs/usage/shoot_operations.md#shoot-force-deletion for more details. // owner: @acumino @ary1992 @shafeeqes // alpha: v1.81.0 ShootForceDeletion featuregate.Feature = "ShootForceDeletion" // MachineControllerManagerDeployment enables Gardener to take over the deployment of the // machine-controller-manager. If enabled, all registered provider extensions must support injecting the // provider-specific MCM provider sidecar container into the deployment via the `controlplane` webhook. // owner: @rfranzke @JensAc @mreiger // alpha: v1.73.0 // beta: v1.81.0 // GA: v1.82.0 // TODO(scheererj): Do not remove this feature gate before v1.90 to give extensions enough time to adopt v1.83. // Otherwise, extensions might end up believing they need to manage MCM again when the feature gate is removed. MachineControllerManagerDeployment featuregate.Feature = "MachineControllerManagerDeployment" // ContainerdRegistryHostsDir enables registry configuration in containerd based on the hosts directory pattern. // The hosts directory pattern is the new way of configuring registries/mirrors in containerd. // Ref https://github.com/containerd/containerd/blob/main/docs/hosts.md. // When this feature gate is enabled, gardenlet adds the following config to containerd's config.toml: // // [plugins."io.containerd.grpc.v1.cri".registry] # gardener-managed // config_path = "/etc/containerd/certs.d" // // This config allows registries to be configured by creating new hosts.toml files under the predefined // /etc/containerd/certs.d directory. // // owner: @ialidzhikov, @dimitar-kostadinov // alpha: v1.77.0 // beta: v1.86.0 // GA: v1.87.0 ContainerdRegistryHostsDir featuregate.Feature = "ContainerdRegistryHostsDir" // APIServerFastRollout enables fast rollouts for Shoot kube-apiservers on the given Seed. // When enabled, maxSurge for Shoot kube-apiserver deployments is set to 100%. // owner: @oliver-goetz // beta: v1.82.0 APIServerFastRollout featuregate.Feature = "APIServerFastRollout" // UseGardenerNodeAgent enables the `gardener-node-agent` instead of the `cloud-config-downloader` for shoot worker // nodes. // owner: @rfranzke @oliver-goetz // alpha: v1.82.0 UseGardenerNodeAgent featuregate.Feature = "UseGardenerNodeAgent" )
Variables ¶
var AllFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ HVPA: {Default: false, PreRelease: featuregate.Alpha}, HVPAForShootedSeed: {Default: false, PreRelease: featuregate.Alpha}, DefaultSeccompProfile: {Default: false, PreRelease: featuregate.Alpha}, CoreDNSQueryRewriting: {Default: false, PreRelease: featuregate.Alpha}, IPv6SingleStack: {Default: false, PreRelease: featuregate.Alpha}, MutableShootSpecNetworkingNodes: {Default: false, PreRelease: featuregate.Alpha}, WorkerlessShoots: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, ShootForceDeletion: {Default: false, PreRelease: featuregate.Alpha}, MachineControllerManagerDeployment: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, ContainerdRegistryHostsDir: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, APIServerFastRollout: {Default: true, PreRelease: featuregate.Beta}, UseGardenerNodeAgent: {Default: false, PreRelease: featuregate.Alpha}, }
AllFeatureGates is the list of all feature gates.
var DefaultFeatureGate = utilfeature.DefaultMutableFeatureGate
DefaultFeatureGate is the central feature gate map used by all gardener components. On startup, the component needs to register all feature gates that are available for this component via `Add`, e.g.:
utilruntime.Must(features.DefaultFeatureGate.Add(features.GetFeatures( features.MyFeatureGateName, )))
With this, every component has its individual set of available feature gates (different to Kubernetes, where all components have all feature gates even if irrelevant). Additionally, the component needs to set the feature gates' states based on the operator's configuration, e.g.:
features.DefaultFeatureGate.SetFromMap(o.config.FeatureGates)
For checking whether a given feature gate is enabled (regardless of which component the code is executed in), use:
features.DefaultFeatureGate.Enabled(features.IPv6SingleStack)
With this, code that needs to check a given feature gate's state can be shared across components, e.g. in API validation code for Seeds (executed in gardener-apiserver and gardenlet). This variable is an alias to the feature gate map in the apiserver library. The library doesn't allow using a custom feature gate map for gardener-apiserver. Hence, we reuse it for all our components.
Functions ¶
func GetFeatures ¶ added in v1.43.0
func GetFeatures(featureGates ...featuregate.Feature) map[featuregate.Feature]featuregate.FeatureSpec
GetFeatures returns a feature gate map with the respective specifications. Non-existing feature gates are ignored.
Types ¶
This section is empty.