featuregate

package
v0.0.0-...-4d19ac6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuperClusterServiceNetwork is an experimental feature that allows the
	// services to share the same ClusterIPs as the super cluster.
	SuperClusterServiceNetwork = "SuperClusterServiceNetwork"

	// SuperClusterPooling is an experimental feature that allows the syncer to
	// pool multiple super clusters for use with the experimental scheduler
	SuperClusterPooling = "SuperClusterPooling"

	// SuperClusterLabelling is an experimental feature that allows the syncer to
	// label managed resources in super cluster for easier filtering.
	SuperClusterLabelling = "SuperClusterLabelling"

	// SuperClusterLabelFilter is an experimental feature that allows the syncer to
	// use labels to filter managed resources in super cluster.
	// The feature requires SuperClusterLabelling=true.
	SuperClusterLabelFilter = "SuperClusterLabelFilter"

	// VNodeProviderService is an experimental feature that allows the
	// vn-agent to run as a load balanced deployment proxy to the super
	// cluster API Server
	VNodeProviderService = "VNodeProviderService"

	// TenantAllowDNSPolicy is an experimental feature that allows the
	// tenant pods to label themselves and use dnsPolicy's like `ClusterFirst`
	// from the super cluster
	TenantAllowDNSPolicy = "TenantAllowDNSPolicy"

	// VNodeProviderPodIP is an experimental feature that allows the
	// vn-agent to run as a daemonset but run without hostNetworking and
	// accessed by the PodIP on each pod on the node
	VNodeProviderPodIP = "VNodeProviderPodIP"

	// ClusterVersionPartialUpgrade is an experimental feature that allows the cluster provisioner
	// to apply ClusterVersion updates if VirtualCluster object is requested it
	ClusterVersionPartialUpgrade = "ClusterVersionPartialUpgrade"

	// TenantAllowResourceNoSync is an experimental feature that gives tenant the capability
	// of not syncing certain resources to super cluster.
	TenantAllowResourceNoSync = "TenantAllowResourceNoSync"

	// DisableCRDPreserveUnknownFields helps control syncing deprecated(k8s <= 1.20) field on CRD.
	// Enabling this will set spec.preserveUnknownField to false regardless the value in source CRD spec.
	DisableCRDPreserveUnknownFields = "DisableCRDPreserveUnknownFields"

	// RootCACertConfigMapSupport is an experimental feature that allows clusters +1.21 to support
	// the kube-root-ca.crt dropped into each Namespace
	RootCACertConfigMapSupport = "RootCACertConfigMapSupport"

	// VServiceExternalIP is an experimental feature that allows the syncer to
	// add clusterIP of pService to vService's externalIPs.
	// So that vService can be resolved by using the k8s_external plugin in coredns.
	VServiceExternalIP = "VServiceExternalIP"

	// KubeAPIAccessSupport is an experimental feature that allows clusters +1.21 to support
	// kube-api-access volume mount
	KubeAPIAccessSupport = "KubeAPIAccessSupport"

	// SyncTenantPVCStatusPhase is an experimental feature that enables the syncer to
	// update the Status.Phase of a tenant cluster's PVC if it is Bound,
	// but the corresponding PVC in the super cluster is not Bound, e.g., Lost.
	// Although rare, this situation can arise due to potential bugs and race conditions.
	// This feature allows users to perform separate investigation and resolution.
	SyncTenantPVCStatusPhase = "SyncTenantPVCStatusPhase"
)

Variables

View Source
var DefaultFeatureGate, _ = NewFeatureGate(nil)

Functions

func Supports

func Supports(featureList FeatureList, featureName string) bool

Supports indicates whether a feature name is supported on the given feature set

Types

type Feature

type Feature string

type FeatureGate

type FeatureGate interface {
	// Enabled returns true if the key is enabled.
	Enabled(key Feature) bool
	// KnownFeatures returns a slice of strings describing the FeatureGate's known features.
	KnownFeatures() []string
	// Set feature gate for known features.
	Set(key Feature, value bool) error
}

FeatureGate indicates whether a given feature is enabled or not

func NewFeatureGate

func NewFeatureGate(m map[string]bool) (FeatureGate, error)

NewFeatureGate stores flag gates for known features from a map[string]bool or returns an error

type FeatureList

type FeatureList map[Feature]FeatureSpec

FeatureList represents a list of feature gates

type FeatureSpec

type FeatureSpec struct {
	Default bool
}

FeatureSpec represents a feature being gated

Jump to

Keyboard shortcuts

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