Documentation ¶
Index ¶
- Constants
- Variables
- 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 Supports(featureList FeatureList, featureName string) bool
- func ValidateVersion(allFeatures FeatureList, requestedFeatures map[string]bool, ...) error
- type Feature
- type FeatureList
Constants ¶
View Source
const ( // HighAvailability is alpha in v1.9 HighAvailability = "HighAvailability" // SelfHosting is beta in v1.8 SelfHosting = "SelfHosting" // StoreCertsInSecrets is alpha in v1.8 StoreCertsInSecrets = "StoreCertsInSecrets" // SupportIPVSProxyMode is alpha in v1.8 SupportIPVSProxyMode = "SupportIPVSProxyMode" )
Variables ¶
View Source
var InitFeatureGates = FeatureList{ SelfHosting: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Beta}}, StoreCertsInSecrets: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}}, HighAvailability: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190}, SupportIPVSProxyMode: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190}, }
InitFeatureGates are the default feature gates for the init command
Functions ¶
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 parse a string of the form "key1=value1,key2=value2,..." into a map[string]bool of known keys or returns an error.
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 }
Feature represents a feature being gated
type FeatureList ¶
FeatureList represents a list of feature gates
Click to show internal directories.
Click to hide internal directories.