kubernetesk8s.io/kubernetes/cmd/kubeadm/app/features Index | Files

package features

import "k8s.io/kubernetes/cmd/kubeadm/app/features"

Index

Constants

const (
	// HighAvailability is alpha in v1.9
	HighAvailability = "HighAvailability"

	// CoreDNS is alpha in v1.9
	CoreDNS = "CoreDNS"

	// SelfHosting is alpha in v1.8 and v1.9
	SelfHosting = "SelfHosting"

	// StoreCertsInSecrets is alpha in v1.8 and v1.9
	StoreCertsInSecrets = "StoreCertsInSecrets"

	// DynamicKubeletConfig is alpha in v1.9
	DynamicKubeletConfig = "DynamicKubeletConfig"
)

Variables

var InitFeatureGates = FeatureList{
	SelfHosting:         {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}},
	StoreCertsInSecrets: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}},

	HighAvailability:     {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190, HiddenInHelpText: true},
	CoreDNS:              {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190},
	DynamicKubeletConfig: {FeatureSpec: utilfeature.FeatureSpec{Default: false, PreRelease: utilfeature.Alpha}, MinimumVersion: v190},
}

InitFeatureGates are the default feature gates for the init command

Functions

func Enabled

func Enabled(featureList map[string]bool, featureName string) bool

Enabled indicates whether a feature name has been enabled

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

func ResolveFeatureGateDependencies(featureGate map[string]bool)

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

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

type Feature struct {
	utilfeature.FeatureSpec
	MinimumVersion   *version.Version
	HiddenInHelpText bool
}

Feature represents a feature being gated

type FeatureList

type FeatureList map[string]Feature

FeatureList represents a list of feature gates

Source Files

features.go

Version
v1.9.1
Published
Jan 3, 2018
Platform
js/wasm
Imports
6 packages
Last checked
47 seconds ago

Tools for package owners.