Design a way to document feature gates across the project
This is a Feature Request
What would you like to be added
- Devise how we'll document feature gates other than for core, mandatory Kubernetes components
- Adopt that design for https://k8s.io/docs/
Why is this needed We have optional components, add-ons, and tools. Many of these optional components have feature gates too, including:
kube-proxy- the Descheduler add-on
kubeadm- Kueue
- the VerticalPodAutoscaler add-on
kubectl
…and more!
It'll help our readers to document all the feature gates in one place, wherever they apply. We should try to do something simple and improve it, rather than trying to do something perfect.
Comments /kind feature /language en /triage accepted /priority backlog Also see these issues:
- https://github.com/kubernetes/website/issues/25645
- https://github.com/kubernetes/website/issues/55775
Kubernetes uses feature gates to allow opting in or opting out of new features. The idea is essentially the thing that Wikipedia calls a feature toggle.
Lots of components use these. We could aim for any of:
- define a recommended, golden path way for subprojects to document these
- but keep them separate
- literally have a page listing all feature gates known to Kubernetes (and which components use them)
- something else
This is going to have to be a low priority thing. It's useful to do but it's more complex than it looks. Starting small and thinking big is likely to be the way forward.
In my opinion, the first task is to figure out what to do.
Also slightly relevant to https://github.com/kubernetes/website/pull/53516
This is an interesting issue as CNCF has lots of projects. IMHO we should go with what Tim @lmktfy suggests. The way I understand it is below
- Create a standard template (golden path) to be used by the subprojects. It should have details about the feature gate name, default status, and alpha/beta/stable versions. Mandate a standard path convention within the component's docs (for example, /docs/reference/{component}/feature-gates/).
- Create a central index page on the k/website with a list of the optional components and link directly to their subproject feature gate page(s).
- Try this out with couple of components.
- Introduce the approach to more projects.
The more I read about feature gates and how they are used across the projects, also checking comments from the team, the more it seems hard, but vital to revive this topic. As different tools and add-ons to k8s use feature gates differently, we can indeed try and suggest a template or data contract for the projects under the k8s and k8s-sigs orgs. I am slightly changing the above proposal to:
- The add-ons under k8s and k8s-sigs org generate a standardized
feature-gates.yamlfile during their release cycle. The Docs team does not care how it is generated (manual or automated). - The Docs team implement a periodic Prow job in kubernetes/test-infra that fetches those YAML files from a registered list of URLs and drops them into a place on the site the team agrees on. Then Hugo uses shortcodes to render on the site.
for CNCF tools outside of k8s and k8s-sigs org, the Docs team redirects users to their external documentation portals. maybe in two weeks team I slightly change the approach again the more I read :)