Open
Description
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-gates
flag. - all "gate names" mentioned in tags are added as valid comma-separated arguments to
--feature-gates
flag. - 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
Activity