website icon indicating copy to clipboard operation
website copied to clipboard

Design a way to document feature gates across the project

Open lmktfy opened this issue 5 months ago • 4 comments

This is a Feature Request

What would you like to be added

  1. Devise how we'll document feature gates other than for core, mandatory Kubernetes components
  2. 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

lmktfy avatar Jun 28 '26 16:06 lmktfy

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.

lmktfy avatar Aug 17 '26 23:08 lmktfy

Also slightly relevant to https://github.com/kubernetes/website/pull/53516

lmktfy avatar Aug 17 '26 23:08 lmktfy

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

  1. 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/).
  2. 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).
  3. Try this out with couple of components.
  4. Introduce the approach to more projects.

mblag avatar Nov 10 '26 09:11 mblag

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:

  1. The add-ons under k8s and k8s-sigs org generate a standardized feature-gates.yaml file during their release cycle. The Docs team does not care how it is generated (manual or automated).
  2. 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 :)

mblag avatar Nov 21 '26 13:11 mblag