Skip to content

Conversation

lmktfy
Copy link
Contributor

@lmktfy lmktfy commented Oct 5, 2025

Handle removed features differently. When a feature has graduated to stable and has since been removed, don't show the info box that we use for feature gates that Kubernetes still recognizes. Instead, show a simple paragraph explaining the situation.

/area web-development

The idea I have is to use the metadata we already have (removed) to decide what text to show to readers.

For previews, see #52632 (comment)

Handle removed features differently. When a feature has graduated to
stable and has since been removed, don't show the info box that we
use for feature gates that Kubernetes still recognizes. Instead, show
a simple paragraph explaining the situation.
@k8s-ci-robot k8s-ci-robot added area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 5, 2025
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Oct 5, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nate-double-u for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 5, 2025
Copy link

netlify bot commented Oct 5, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 132ac24
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/68e2b26eb553000008b73475
😎 Deploy Preview https://deploy-preview-52632--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lmktfy
Copy link
Contributor Author

lmktfy commented Oct 5, 2025

Example of a feature gate not marked as removed, legacy means to specify it:
https://deploy-preview-52632--kubernetes-io-main-staging.netlify.app/docs/reference/access-authn-authz/authentication/#bootstrap-tokens

No explanatory text but still works.


Example of a feature gate not marked as removed, recommended means to specify it, recent graduation:
https://deploy-preview-52632--kubernetes-io-main-staging.netlify.app/docs/reference/access-authn-authz/authentication/#using-authentication-configuration

This is a stable feature in Kubernetes, and has been since version 1.34. It was first available in the v1.29 release.


Example of a feature gate marked as removed, recommended means to specify it:
https://deploy-preview-52632--kubernetes-io-main-staging.netlify.app/docs/concepts/architecture/nodes/#node-topology

This is a stable feature in Kubernetes, and has been since version 1.27. It was first available in the v1.16 release. You can no longer disable or opt of of this behavior.

I have deliberately picked an example that is a little stale.

Even if we make this this change, we should revise https://kubernetes.io/docs/concepts/architecture/nodes/#node-topology to remove ”If you have enabled the TopologyManager feature gate, then…”. I would also remove the feature gate shortcode from that section at the same time, as it's been stable for a while. However, this PR is not the place to fix that. We could use #52626 for that work, or tweak #52626 to leave in some feature gates where the removal is relatively recent.

Bear in mind that if we add metadata to record whether feature gates are locked, we can tweak the logic without needing to change the message. The statements in the docs would remain true.

@lmktfy
Copy link
Contributor Author

lmktfy commented Oct 5, 2025

Want different text? Feel free to suggest changes to it.

Comment on lines +179 to +184
[feature_gate_stable_graduated]
other = "This is a stable feature in Kubernetes, and has been since version {{ .stableVersion }}. It was first available in the v{{ .firstReleaseWithThisFeature }} release."

[feature_gate_stable_locked]
other = "This is a stable feature in Kubernetes, and has been since version {{ .stableVersion }}. It was first available in the v{{ .firstReleaseWithThisFeature }} release. You can no longer disable or opt of of this behavior."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text / template is easy to amend.

@tengqm
Copy link
Contributor

tengqm commented Oct 5, 2025

There are some slight differences between the following states of a feature gate:

  • GA'ed but not "locked": you can specify the gate, and you can opt out;
  • GA'ed and "locked": you can specify the gate, but you cannot opt out;
  • Removed: you can NOT specify the gate, it is completely gone, no longer recognized as a valid gate.

For gates that have been removed, we may want to drop the anchors instead of carry them on forever.

@lmktfy
Copy link
Contributor Author

lmktfy commented Oct 6, 2025

There are some slight differences between the following states of a feature gate:

  • GA'ed but not "locked": you can specify the gate, and you can opt out;
  • GA'ed and "locked": you can specify the gate, but you cannot opt out;
  • Removed: you can NOT specify the gate, it is completely gone, no longer recognized as a valid gate.

I agree. And I hope that a future PR continues our improvement journey.

For gates that have been removed, we may want to drop the anchors instead of carry them on forever.

Anchors?

If you mean shortcodes, then removing the shortcodes can still happen. I propose retaining the shortcode for a number of releases after it has been removed, or since it became stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants