features

package
v1.72.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFeatureGateSupported

func IsFeatureGateSupported(featureGate, version string) (bool, error)

IsFeatureGateSupported returns true if the given feature gate is supported for the given Kubernetes version. A feature gate is only supported if it's a known feature gate and its version range contains the given Kubernetes version.

func ValidateFeatureGates

func ValidateFeatureGates(featureGates map[string]bool, version string, fldPath *field.Path) field.ErrorList

ValidateFeatureGates validates the given Kubernetes feature gates against the given Kubernetes version.

Types

type FeatureGateVersionRange

type FeatureGateVersionRange struct {
	Default                  bool
	AddedInVersion           string
	LockedToDefaultInVersion string
	RemovedInVersion         string
}

FeatureGateVersionRange represents a version range of type [AddedInVersion, RemovedInVersion).

func (*FeatureGateVersionRange) Contains

func (r *FeatureGateVersionRange) Contains(version string) (bool, error)

Contains returns true if the range contains the given version, false otherwise. The range contains the given version only if it's greater or equal than AddedInVersion (always true if AddedInVersion is empty), and less than RemovedInVersion (always true if RemovedInVersion is empty).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL