Skip to content

Conversation

@mochizuki875
Copy link
Member

@k8s-ci-robot k8s-ci-robot added this to the 1.34 milestone May 30, 2025
@netlify
Copy link

netlify bot commented May 30, 2025

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

Name Link
🔨 Latest commit 8ad8c10
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-vnext-staging/deploys/686cca6142132b00080d41d2

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 30, 2025
@k8s-ci-robot k8s-ci-robot requested a review from drewhagen May 30, 2025 18:03
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label May 30, 2025
@k8s-ci-robot k8s-ci-robot requested a review from reylejano May 30, 2025 18:03
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 30, 2025
Copy link
Member

@lmktfy lmktfy left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 30, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 3198ef123f30040fafb95be0d9458712dcd744c0

@netlify
Copy link

netlify bot commented May 30, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 8ad8c10
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-io-main-staging/deploys/686cca61dbfb9b000825a87f
😎 Deploy Preview https://deploy-preview-51119--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.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 31, 2025
@k8s-ci-robot k8s-ci-robot requested a review from lmktfy May 31, 2025 16:43
Copy link
Member

@lmktfy lmktfy left a comment

Choose a reason for hiding this comment

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

LGTM for docs

@lmktfy
Copy link
Member

lmktfy commented Jun 1, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 1, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: e0ce9afeec7c3ac1f968ddee7ba4662e2a0e9c81

@divya-mohan0209
Copy link
Contributor

/sig scheduling

@k8s-ci-robot k8s-ci-robot added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Jun 15, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Scheduling Jun 15, 2025
@divya-mohan0209
Copy link
Contributor

@kubernetes/sig-scheduling-leads PTAL and advise on tech accuracy.

Copy link
Member

@sanposhiho sanposhiho left a comment

Choose a reason for hiding this comment

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

two nits

fromVersion: "1.34"
---
Enable merging of selectors built from `matchLabelKeys` into `labelSelector` of
[Pod topology spread constraints](/docs/concepts/scheduling-eviction/topology-spread-constraints/). No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

This feature gate can be enabled when matchLabelKeys feature is enabled with the MatchLabelKeysInPodTopologySpread feature flag.

The `matchLabelKeys` field is a beta-level field and enabled by default in 1.27. You can disable it by disabling the
`MatchLabelKeysInPodTopologySpread` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).

Before v1.34, kube-scheduler just internally handled `matchLabelKeys` before the calculation of scheduling results.
Copy link
Member

Choose a reason for hiding this comment

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

nit: kube-scheduler didn't handle it before the calculation, it did handle it during the calculation.

Suggested change
Before v1.34, kube-scheduler just internally handled `matchLabelKeys` before the calculation of scheduling results.
Before v1.34, kube-scheduler just internally handled `matchLabelKeys` and calculating scheduling results.

Copy link
Member Author

Choose a reason for hiding this comment

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

@sanposhiho
That's absolutely true.
BTW, is "calculated" more appropriate than "calculating" in terms of grammar?

Copy link
Member

Choose a reason for hiding this comment

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

yup

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 20, 2025
@k8s-ci-robot k8s-ci-robot requested a review from lmktfy June 20, 2025 16:14
`MatchLabelKeysInPodTopologySpread` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).

Before v1.34, kube-scheduler just internally handled `matchLabelKeys` before the calculation of scheduling results.
Before v1.34, kube-scheduler just internally handled `matchLabelKeys` and calculated scheduling results.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change?

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
It's to align with PodAffinity's matchLabelKeys and described in KEP-3243.
However should we describe it here too?

Copy link
Contributor

Choose a reason for hiding this comment

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

So .... there used to be a strict order but starting from 1.34, the ordering has been relaxed?

Copy link
Member Author

Choose a reason for hiding this comment

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

In terms of the function of matchLabelKeys, which is a list of pod label keys that pod spreading is calculated based on, the strength of constraints hasn't changed between v1.33 and v1.34.

In the case of PodAffinity's matchLabelKeys, key-value labels corresponding to matchLabelKeys are explicitly merged into LabelSelector by apiserver, and scheduler handles them.
On the other hand, in the case of TopologySpreadConstraints prior to v1.34, matchLabelKeys are directly handled by scheduler and key-value labels corresponding to matchLabelKeys are not merged into LabelSelector.

From v1.34, key-value labels are merged into LabelSelector as PodAffinity(as described here), but the function of matchLabelKeys does not change or become stricter.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mochizuki875 Do you mean that the user perceivable behavior has not changed? In other words, users don't need to care about this level of implementation details?

Copy link
Member Author

@mochizuki875 mochizuki875 Jun 23, 2025

Choose a reason for hiding this comment

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

@tengqm
Hmm, the behavior itself(scheduling calculation logic of matchLabelKeys) has not change.
So I think users don't need to care about it so much.
It only changes how it appears to the user; whether labelSelectors built from matchLabelKeys are visible in podSpec(e.g. The result of kubectl get pod xxx -o yaml).

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. Can we then focus on the user-perceivable changes rather than forcing the users to understand the implementation details?
If users don't need to care about it, maybe we can remove all the relevant texts to avoid confusion?

Copy link
Member

@sanposhiho sanposhiho Jun 23, 2025

Choose a reason for hiding this comment

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

What's "users" you are saying? I mean, if it's end users who just uses K8s cluster that whoever provisioned, then they shouldn't have to know about this detail. But, if you mean "users" equals cluster admins, then they might want to know it. Because they might observe some unintended behavior from this change (of course, hopefully not though). Note that we introduced this feature flag for those cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. Then I'd suggest that we focus on the user-perceivable (behavior) changes.
Changing from

Before v1.34, kube-scheduler just internally handled matchLabelKeys before the calculation of scheduling results.

to

Before v1.34, kube-scheduler just internally handled matchLabelKeys and calculated scheduling results.

doesn't help clarify what the users need/want to know.

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
If we focus on behavior as perceived by end users, I think we should only refer to whether labelSelectors built from matchLabelKeys are visible in podSpec or not.
So how about this:

Before v1.34, matchLabelKeys was handled implicitly.
Since v1.34, key-value labels corresponding to matchLabelKeys are explicitly merged into labelSelector.

@mochizuki875 mochizuki875 force-pushed the design_change_of_podtopologyspread_matchlablkeys branch from da6f099 to 525fb22 Compare July 8, 2025 07:03
@k8s-ci-robot k8s-ci-robot added the area/blog Issues or PRs related to the Kubernetes Blog subproject label Jul 8, 2025
@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 8, 2025
@mochizuki875 mochizuki875 force-pushed the design_change_of_podtopologyspread_matchlablkeys branch from 525fb22 to 4a09bb7 Compare July 8, 2025 07:04
@mochizuki875 mochizuki875 force-pushed the design_change_of_podtopologyspread_matchlablkeys branch from 2167fb7 to 8ad8c10 Compare July 8, 2025 07:35
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 8, 2025
@t-inu
Copy link
Member

t-inu commented Jul 13, 2025

/remove-language bn fr id ja pt zh
/remove-area blog localization web-development

@k8s-ci-robot k8s-ci-robot removed language/bn Issues or PRs related to Bengali language language/fr Issues or PRs related to French language language/id Issues or PRs related to Indonesian language language/ja Issues or PRs related to Japanese language language/pt Issues or PRs related to Portuguese language language/zh Issues or PRs related to Chinese language area/blog Issues or PRs related to the Kubernetes Blog subproject area/localization General issues or PRs related to localization area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes labels Jul 13, 2025
@helayoty helayoty moved this from Needs Triage to Backlog in SIG Scheduling Jul 24, 2025
@helayoty helayoty moved this from Backlog to Needs Review in SIG Scheduling Jul 24, 2025
@michellengnx
Copy link
Contributor

Hello @mochizuki875 👋! I'm reaching out from the Docs team.

Just checking in as we approach Docs Freeze on Wednesday August 6, 2025 18:00 PDT. This documentation appears to still be under review. To meet the Docs Freeze, this PR must have a technical review as well as lgtm and approve labels applied, without any unaddressed comments or concerns from SIG Docs. Thank you!

@macsko
Copy link
Member

macsko commented Aug 6, 2025

/approve
SIG Scheduling

/assign @lmktfy
For docs approval

@natalisucks
Copy link
Contributor

@macsko for future tech reviews on docs, please add the LGTM label instead, since only SIG Docs approvers have the ability to add the approve label in this repo.
given we have both tech and now my docs review, i'm adding both labels so we can make sure this makes the Docs Freeze deadline – thanks so all reviewers!
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 6, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 01870e94af849257c00729fc8ebdc468d6a510c3

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: macsko, natalisucks

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

The pull request process is described here

Details 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2025
@k8s-ci-robot k8s-ci-robot merged commit 66f381e into kubernetes:dev-1.34 Aug 6, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from Needs Review to Done in SIG Scheduling Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

10 participants