features

package
v0.0.0-...-b9df8bb Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterProfileToShortName

func ClusterProfileToShortName(annotation string) string

func InitializeFeatureGates

func InitializeFeatureGates(featureGates featuregate.MutableFeatureGate, profileName features.ClusterProfileName, usedFeatures ...configv1.FeatureGateName) error

InitializeFeatureGates should be called when your binary is starting with your featuregate instance and the list of featuregates that your process will honor.

func SetFeatureGates

func SetFeatureGates(flags map[string][]string, featureGates featuregate.MutableFeatureGate) ([]string, error)

SetFeatureGates sets the featuregates from the flags and return a list of printable warnings and an error if there was a failure. If you already have the Map from the CLI version, use featureGates.SetFromMap.

Types

type ByCount

type ByCount []StringCount

func (ByCount) Len

func (a ByCount) Len() int

func (ByCount) Less

func (a ByCount) Less(i, j int) bool

func (ByCount) Swap

func (a ByCount) Swap(i, j int)

type ColumnTuple

type ColumnTuple struct {
	ClusterProfile string
	FeatureSet     string
}

type FeatureGateDiffInfo

type FeatureGateDiffInfo struct {
	ClusterProfile string
	FeatureSet     string

	ChangedFeatureGates map[string]string
}

type FeatureGateInfo

type FeatureGateInfo struct {
	ClusterProfile string
	FeatureSet     string

	Enabled         sets.Set[string]
	Disabled        sets.Set[string]
	AllFeatureGates map[string]bool
}

type FeatureGateOptions

type FeatureGateOptions struct {
	// contains filtered or unexported fields
}

func NewFeatureGateOptions

func NewFeatureGateOptions(featureGates featuregate.MutableFeatureGate, profileName features.ClusterProfileName, usedFeatures ...configv1.FeatureGateName) (*FeatureGateOptions, error)

func NewFeatureGateOptionsOrDie

func NewFeatureGateOptionsOrDie(featureGates featuregate.MutableFeatureGate, profileName features.ClusterProfileName, usedFeatures ...configv1.FeatureGateName) *FeatureGateOptions

func (*FeatureGateOptions) AddFlags

func (o *FeatureGateOptions) AddFlags(cmd *cobra.Command)

func (*FeatureGateOptions) AddFlagsToGoFlagSet

func (o *FeatureGateOptions) AddFlagsToGoFlagSet(flagset *flag.FlagSet)

func (*FeatureGateOptions) ApplyTo

func (o *FeatureGateOptions) ApplyTo(featureGates featuregate.MutableFeatureGate) ([]string, error)

ApplyTo mutates the featureGates to set the known features and returns a list of printable warnings and an error if something fatal happened.

type FilenameToContent

type FilenameToContent map[string][]byte

type ReleaseFeatureDiffInfo

type ReleaseFeatureDiffInfo struct {
	// contains filtered or unexported fields
}

func (*ReleaseFeatureDiffInfo) AllClusterProfiles

func (i *ReleaseFeatureDiffInfo) AllClusterProfiles() sets.Set[string]

func (*ReleaseFeatureDiffInfo) AllFeatureInfo

func (i *ReleaseFeatureDiffInfo) AllFeatureInfo() []*FeatureGateDiffInfo

func (*ReleaseFeatureDiffInfo) AllFeatureSets

func (i *ReleaseFeatureDiffInfo) AllFeatureSets() sets.Set[string]

func (*ReleaseFeatureDiffInfo) FeatureInfoFor

func (i *ReleaseFeatureDiffInfo) FeatureInfoFor(clusterProfile, featureSet string) *FeatureGateDiffInfo

func (*ReleaseFeatureDiffInfo) GetOrderedFeatureGates

func (i *ReleaseFeatureDiffInfo) GetOrderedFeatureGates() []string

type ReleaseFeatureInfo

type ReleaseFeatureInfo struct {
	// contains filtered or unexported fields
}

func ReadReleaseFeatureInfo

func ReadReleaseFeatureInfo(ctx context.Context, files FilenameToContent) (*ReleaseFeatureInfo, error)

func ReadReleaseFeatureInfoFromDir

func ReadReleaseFeatureInfoFromDir(ctx context.Context, dir string) (*ReleaseFeatureInfo, error)

func (*ReleaseFeatureInfo) AllClusterProfiles

func (i *ReleaseFeatureInfo) AllClusterProfiles() sets.Set[string]

func (*ReleaseFeatureInfo) AllFeatureGates

func (i *ReleaseFeatureInfo) AllFeatureGates() sets.Set[string]

func (*ReleaseFeatureInfo) AllFeatureInfo

func (i *ReleaseFeatureInfo) AllFeatureInfo() []*FeatureGateInfo

func (*ReleaseFeatureInfo) AllFeatureSets

func (i *ReleaseFeatureInfo) AllFeatureSets() sets.Set[string]

func (*ReleaseFeatureInfo) CalculateDiff

func (*ReleaseFeatureInfo) FeatureInfoFor

func (i *ReleaseFeatureInfo) FeatureInfoFor(clusterProfile, featureSet string) *FeatureGateInfo

func (*ReleaseFeatureInfo) GetOrderedFeatureGates

func (i *ReleaseFeatureInfo) GetOrderedFeatureGates() []string

type StringCount

type StringCount struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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