Last active
March 13, 2024 15:09
-
-
Save deads2k/98751209925c8dfa986baf03f2d42d11 to your computer and use it in GitHub Desktop.
featuregates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k8s.io/apiserver | |
rapid-reset, defaulted to off. In repos vendoring, I needed to enable/disable | |
k8s.io/client-go | |
aggregated-discovery - had a bug and needed way for every vendoring binary we cannot recompile to disable. We added env vars. | |
streaming-list - desire to have different default in kube-controller-manager versus kubelet | |
kube-controller-manager | |
client-go/streaming-list - disabled by default in library, kcm wants it enabled by default and controlled via flag. | |
other controllers and operators | |
client-go/streaming-list - disabled by default in library,operator wants it enabled, leave as env var | |
kubernetes-sigs/structured-merge-diff | |
how would we like to put featuregates in it? registered where and how? perhaps select a different cadence? | |
intersection with the API compatibility version | |
other projects (controllers and apiservers) vendor k8s.io/apiserver and k8s.io/cient-go. | |
other projects (especially apiservers) define their own featuregates | |
other projects specify their own versions | |
the featuregates in k8s.io/apiserver and k8s.io/client-go need to keep their gates separate to understand their compatibility version separately. | |
openshift binaries have their own featuregates and vendor kube | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
registering into a global variable produces problems: glog's usage golang global flags | |
global flags age less well than cobra flags | |
as libraries compose with other libraries, referring to local instances allows opt-in versus try to find a way to opt-out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func init() { | |
gates := featuregate.New() | |
runtime.Must(gates.Add(utilfeature.All)) | |
runtime.Must(gates.Add(clientfeatures.All)) | |
runtime.Must(utilfeature.SetDefault(gates)) | |
runtime.Must(clientfeatures.SetDefault(gates)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment