github.com/oam-dev/cluster-gateway@v1.9.0/pkg/featuregates/featue_gate.go (about) 1 package featuregates 2 3 import ( 4 utilfeature "k8s.io/apiserver/pkg/util/feature" 5 "k8s.io/component-base/featuregate" 6 "k8s.io/klog/v2" 7 ) 8 9 func init() { 10 if err := utilfeature.DefaultMutableFeatureGate.Add(DefaultKubeFedFeatureGates); err != nil { 11 klog.Fatalf("Unexpected error: %v", err) 12 } 13 } 14 15 const ( 16 // owner: @yue9944882 17 // alpha: v1.1.12 18 // 19 // HealthinessCheck enables the "/health" subresource on the ClusterGateway 20 // by which we can read/update the healthiness related status under the 21 // ".status". 22 // 23 // Additionally, OCM cluster-gateway addon will enable a health-check controller 24 // in the background which periodically checks the healthiness for each managed 25 // cluster by dialing "/healthz" api path. 26 HealthinessCheck featuregate.Feature = "HealthinessCheck" 27 28 // owner: @yue9944882 29 // alpha: v1.1.15 30 // 31 // SecretCache runs a namespaced secret informer inside the apiserver which 32 // provides a cache for reading secret data. 33 SecretCache featuregate.Feature = "SecretCache" 34 35 // owner: @somefive 36 // alpha: v1.4.0 37 // 38 // ClientIdentityPenetration enforce impersonate as the original request user 39 // when accessing apiserver in ManagedCluster 40 ClientIdentityPenetration featuregate.Feature = "ClientIdentityPenetration" 41 42 // owner: @ivan-cai 43 // beta: v1.6.0 44 // 45 // SecretCache runs a OCM ManagedCluster informer inside the apiserver which 46 // provides a cache for reading ManagedCluster. 47 OCMClusterCache featuregate.Feature = "OCMClusterCache" 48 ) 49 50 var DefaultKubeFedFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ 51 HealthinessCheck: {Default: false, PreRelease: featuregate.Alpha}, 52 SecretCache: {Default: true, PreRelease: featuregate.Beta}, 53 ClientIdentityPenetration: {Default: false, PreRelease: featuregate.Alpha}, 54 OCMClusterCache: {Default: true, PreRelease: featuregate.Beta}, 55 }