Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDeprecatedFlags(f *FeatureList, features map[string]bool) map[string]string
- func Enabled(featureList map[string]bool, featureName string) bool
- func Keys(featureList FeatureList) []string
- func KnownFeatures(f *FeatureList) []string
- func NewFeatureGate(f *FeatureList, value string) (map[string]bool, error)
- func ResolveFeatureGateDependencies(featureGate map[string]bool)
- func Supports(featureList FeatureList, featureName string) bool
- func ValidateVersion(allFeatures FeatureList, requestedFeatures map[string]bool, ...) error
- type Feature
- type FeatureList
Constants ¶
const ( // HighAvailability is alpha in v1.9 - deprecated in v1.12 (TODO remove in v1.13) HighAvailability = "HighAvailability" // CoreDNS is GA in v1.11 CoreDNS = "CoreDNS" // SelfHosting is alpha in v1.8 and v1.9 - deprecated in v1.12 (TODO remove in v1.13) SelfHosting = "SelfHosting" // StoreCertsInSecrets is alpha in v1.8 and v1.9 - deprecated in v1.12 (TODO remove in v1.13) StoreCertsInSecrets = "StoreCertsInSecrets" // DynamicKubeletConfig is beta in v1.11 DynamicKubeletConfig = "DynamicKubeletConfig" // Auditing is beta in 1.8 Auditing = "Auditing" )
Variables ¶
var InitFeatureGates = FeatureList{ SelfHosting: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Deprecated}, HiddenInHelpText: true, DeprecationMessage: selfHostingDeprecationMessage}, StoreCertsInSecrets: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Deprecated}, HiddenInHelpText: true, DeprecationMessage: storeCertsInSecretsDeprecationMessage}, HighAvailability: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Deprecated}, HiddenInHelpText: true, DeprecationMessage: highAvailabilityMessage}, CoreDNS: {FeatureSpec: utilfeature.FeatureSpec{Default: true, PreRelease: utilfeature.GA}}, DynamicKubeletConfig: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Beta}}, Auditing: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}}, }
InitFeatureGates are the default feature gates for the init command
Functions ¶
func CheckDeprecatedFlags ¶ added in v1.12.0
func CheckDeprecatedFlags(f *FeatureList, features map[string]bool) map[string]string
CheckDeprecatedFlags takes a list of existing feature gate flags and validates against the current feature flag set. It used during upgrades for ensuring consistency of feature gates used in an existing cluster, that might be created with a previous version of kubeadm, with the set of features currently supported by kubeadm
func Keys ¶
func Keys(featureList FeatureList) []string
Keys returns a slice of feature names for a given feature set
func KnownFeatures ¶
func KnownFeatures(f *FeatureList) []string
KnownFeatures returns a slice of strings describing the FeatureList features.
func NewFeatureGate ¶
func NewFeatureGate(f *FeatureList, value string) (map[string]bool, error)
NewFeatureGate parses a string of the form "key1=value1,key2=value2,..." into a map[string]bool of known keys or returns an error.
func ResolveFeatureGateDependencies ¶ added in v1.9.0
ResolveFeatureGateDependencies resolve dependencies between feature gates
func Supports ¶
func Supports(featureList FeatureList, featureName string) bool
Supports indicates whether a feature name is supported on the given feature set
func ValidateVersion ¶ added in v1.9.0
func ValidateVersion(allFeatures FeatureList, requestedFeatures map[string]bool, requestedVersion string) error
ValidateVersion ensures that a feature gate list is compatible with the chosen kubernetes version
Types ¶
type Feature ¶ added in v1.9.0
type Feature struct { utilfeature.FeatureSpec MinimumVersion *version.Version HiddenInHelpText bool DeprecationMessage string }
Feature represents a feature being gated
type FeatureList ¶
FeatureList represents a list of feature gates