util

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	METRICS_ENDPOINT                = "/metrics"
	K8S_FEATURE_ENABLED_METRIC_NAME = "kubernetes_feature_enabled"
	K8S_FEATURE_ENABLED_NAME_LABEL  = "name"
	K8S_FEATURE_ENABLED_STAGE_LABEL = "stage"

	FEATURE_GATE_STAGE_ALPHA      FeatureGateStage = "ALPHA"
	FEATURE_GATE_STAGE_BETA       FeatureGateStage = "BETA"
	FEATURE_GATE_STAGE_GA         FeatureGateStage = ""
	FEATURE_GATE_STAGE_DEPRECATED FeatureGateStage = "DEPRECATED"
)

Variables

This section is empty.

Functions

func ManageCerts

func ManageCerts(mgr ctrl.Manager, namespace string, setupFinished chan struct{}) error

Types

type FeatureGateStage added in v0.11.0

type FeatureGateStage string

type FeatureGateValidator added in v0.11.0

type FeatureGateValidator interface {
	// GetFeatureGates returns the supported feature gates
	GetFeatureGates() (FeatureGates, error)
}

FeatureGateValidator validates if a given feature gates are enabled on a cluster

func NewMetricsFeatureGateValidator added in v0.11.0

func NewMetricsFeatureGateValidator(ctx context.Context, RESTClient restclient.Interface) FeatureGateValidator

func NewMetricsFeatureGateValidatorFromConfig added in v0.11.0

func NewMetricsFeatureGateValidatorFromConfig(ctx context.Context, config *restclient.Config) (FeatureGateValidator, error)

type FeatureGates added in v0.11.0

type FeatureGates map[string]map[string]bool

func (FeatureGates) IsEnabled added in v0.11.0

func (f FeatureGates) IsEnabled(featureGate string, stage FeatureGateStage) bool

func (FeatureGates) IsEnabledAnyStage added in v0.11.0

func (f FeatureGates) IsEnabledAnyStage(featureGate string) bool

Jump to

Keyboard shortcuts

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