mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-21 14:43:32 +00:00
Don't Panic, everything is fine
control plane components share global DefaultFeatureGate/DefaultMutableFeatureGate variables
See also:
9497222ae2..db342010f4
Signed-off-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
committed by
rafaelbreno[commit]
parent
d4e8fee515
commit
80cff1ea62
@@ -46,6 +46,7 @@ import (
|
||||
"k8s.io/component-base/metrics"
|
||||
"k8s.io/component-base/zpages/flagz"
|
||||
cmoptions "k8s.io/controller-manager/options"
|
||||
"k8s.io/klog/v2"
|
||||
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
|
||||
kubecontrollerconfig "k8s.io/kubernetes/cmd/kube-controller-manager/app/config"
|
||||
"k8s.io/kubernetes/cmd/kube-controller-manager/names"
|
||||
@@ -301,7 +302,7 @@ func (s *KubeControllerManagerOptions) Flags(allControllers []string, disabledBy
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(featuregate.Feature(clientgofeaturegate.WatchListClient)) {
|
||||
ver := version.MustParse("1.34")
|
||||
if err := utilfeature.DefaultMutableFeatureGate.OverrideDefaultAtVersion(featuregate.Feature(clientgofeaturegate.WatchListClient), true, ver); err != nil {
|
||||
panic(fmt.Sprintf("unable to set %s feature gate, err: %v", clientgofeaturegate.WatchListClient, err))
|
||||
klog.Infof(fmt.Sprintf("unable to set %s feature gate, err: %v", clientgofeaturegate.WatchListClient, err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user