kubebuilder
kubebuilder copied to clipboard
Feature Gates
Core Kubernetes types have Feature Gates. They are documented here: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
This is a good practice for anyone, whether they are building a CRD as part of the K8s org, or their own API.
Sadly, CRDs don't have feature gate support built into them.
KubeBuilder could close this gap. It could provide a feature-gate feature.
It might work like this:
- Developer tags a field in an API as belonging to a feature gate, like `// +feature-gate the-new-hotness
- KB (or controller-runtime or controller-tools) makes your controller binary have a
--feature-gatesflag. - all "gate names" mentioned in tags are added as valid comma-separated arguments to
--feature-gatesflag. - When installing the CRD, controller-tools will blank out disabled parts of the schema. This causes pruning to prune them.
- Generated documentation lists the supported feature gate strings.
/kind feature
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/lifecycle frozen
It is related to: https://github.com/kubernetes-sigs/controller-tools/issues/600 Also, if you would like to understand more about the use cases see: https://www.youtube.com/watch?v=AJa2B-twtG4