Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add FeatureGate toggling implementation change since v1.33 #50122

Conversation

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language labels Mar 17, 2025
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 17, 2025
Copy link

netlify bot commented Mar 17, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 99a018c
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67d9128af146c400088370aa
😎 Deploy Preview https://deploy-preview-50122--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 site configuration.

render: false

stages:
- stage: beta
Copy link
Contributor

Choose a reason for hiding this comment

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

For this kind of shit as gate features, can we start from "Alpha"?
We as developers should avoid changing user land whenever possible.
If we have to do it, to fix a serious bug, we just fix it.
Why are we introducing a feature gate for such a change?

Please think from users' perspective. I, as a user, have no idea why this change is supposed to be disabled, or enabled. Even I do understand the corner case and its impact on my workloads, I have no idea which components this feature affects. Then I have to restart all my control-plane pods and all kubelets on all nodes. Is this a scenario we the development community is happy with?

Copy link
Member Author

Choose a reason for hiding this comment

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

@tengqm
Thank you for your comment.
This feature is an implementation design change of KEP-3243.
We consider the risk to be low and the FeatureGate of KEP-3243 MatchLabelKeysInPodTopologySpread has been true since v1.27.
Therefore in our discussion, we decided to add the new FeatureGate MatchLabelKeysInPodTopologySpreadSelectorMerge to control whether this change enable or disable, and start at the same level as MatchLabelKeysInPodTopologySpread(beta).

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification, @mochizuki875.
I may sound too harsh for a change that has been thoroughly discussed, but please don't take it personal. I've been watching feature gate changes for many years. One thing that concerns me is that some developers are abusing feature gates for things that they are not sure about. They are doing this without thinking from user's perspective. For example, when we are introducing a new behavior change to a particular component, say kube-scheduler, we may add a configuration option to the scheduler config file, or a command line flag. Feature gates are heavy. Given that we cannot tell which gate is relevant to which component, the safest way to make a change is to restart all control-plane components, and all node agents including kubelet and kube-proxy. For a large scale cluster, this process is not trivial. We develop features or propose bug fixes to make people's lives easier, not harder. We provide clear documentation for them to know why there is such a gate and what are the pros and cons for enabling/disabling it. Kubernetes are used in many production environments, we are not supposed to treat changes like this as developer-facing experiments. By saying this, I'm talking about a lot of shit gates we encountered lately.

Copy link
Member Author

@mochizuki875 mochizuki875 Mar 19, 2025

Choose a reason for hiding this comment

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

@tengqm
OK, I've added additional description about the FeatureGate in latest commit.
Do you think there is anything else we should include?

In addition, the code change(#129874) may not meet the v1.33 code freeze.
Therefore I'll revert docs change(#49607) and close this PR.
After that, I'll submit new PR merging them.

Copy link
Contributor

Choose a reason for hiding this comment

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

No worry. Let's put this on hold. We'll only lift the hold when the upstream change is merged.
/hold

Copy link
Member Author

Choose a reason for hiding this comment

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

@tengqm
Thank you.
Since the code change(#129874) has not meet the v1.33 code freeze, I've submitted revert PR(#50164) which remove the description of this feature from dev-1.33 branch.

For the next step, which option do you think is better? Alternatively, do you have any other suggestions?

  1. Keep this featuregate PR and resubmit new PR including the description of this feature(#49607).
  2. Merge the description of this feature(#49607) into this PR and retitle
  3. Close this featuregate PR and resubmit new PR merging the description of this feature(#49607)

Anyway, I think I need to change the target branch dev-v1.33 to dev-1.34(when created).

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, I'd suggest we close this one and resubmit a new one when the upstream code change is ready.

@mochizuki875 mochizuki875 changed the base branch from main to dev-1.33 March 18, 2025 06:12
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 18, 2025
@mochizuki875 mochizuki875 force-pushed the fg_matchlabelkeys_podtopologyspread_design_change branch from 0837480 to 44b77c2 Compare March 18, 2025 06:15
@k8s-ci-robot k8s-ci-robot added area/blog Issues or PRs related to the Kubernetes Blog subproject area/localization General issues or PRs related to localization language/ko Issues or PRs related to Korean language language/pl Issues or PRs related to Polish language language/vi Issues or PRs related to Vietnamese language language/zh Issues or PRs related to Chinese language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Mar 18, 2025
Copy link

netlify bot commented Mar 18, 2025

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

Name Link
🔨 Latest commit 99a018c
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/67d9128a82ad8a00086d9dc8

@mochizuki875 mochizuki875 force-pushed the fg_matchlabelkeys_podtopologyspread_design_change branch from 44b77c2 to 99a018c Compare March 18, 2025 06:28
@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 rayandas 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 18, 2025
Before v1.33, kube-scheduler just internally handled `matchLabelKeys` before the calculation of scheduling results.
Since v1.33, merging selectors built from `matchLabelKeys` into `labelSelector` is enabled by default.
You can disable it and revert to the previous behavior by disabling the `MatchLabelKeysInPodTopologySpreadSelectorMerge`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) of kube-apiserver.
Copy link
Contributor

Choose a reason for hiding this comment

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

This clarification means we only need to toggle the gate on the API server, right?
That is nice.

Copy link
Member Author

Choose a reason for hiding this comment

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

@tengqm

This clarification means we only need to toggle the gate on the API server, right?

Yes, that's right.

render: false

stages:
- stage: beta
Copy link
Contributor

Choose a reason for hiding this comment

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

No worry. Let's put this on hold. We'll only lift the hold when the upstream change is merged.
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 19, 2025
@mochizuki875
Copy link
Member Author

Since kubernetes/kubernetes#129874 have not meet the v1.33 code freeze, I've closed this PR.
I'll submit new PR for next release cycle.

/close

@k8s-ci-robot
Copy link
Contributor

@mochizuki875: Closed this PR.

In response to this:

Since kubernetes/kubernetes#129874 have not meet the v1.33 code freeze, I've closed this PR.
I'll submit new PR for next release cycle.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/blog Issues or PRs related to the Kubernetes Blog subproject area/localization General issues or PRs related to localization cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. language/en Issues or PRs related to English language language/ko Issues or PRs related to Korean language language/pl Issues or PRs related to Polish language language/vi Issues or PRs related to Vietnamese language language/zh Issues or PRs related to Chinese language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants