Skip to content

add: the doc for matchLabelKeys/mismatchLabelKeys in pod (anti)affinity#43812

Merged
k8s-ci-robot merged 4 commits intokubernetes:dev-1.29from
sanposhiho:matchlabelkeyinpodaffinity
Nov 20, 2023
Merged

add: the doc for matchLabelKeys/mismatchLabelKeys in pod (anti)affinity#43812
k8s-ci-robot merged 4 commits intokubernetes:dev-1.29from
sanposhiho:matchlabelkeyinpodaffinity

Conversation

@sanposhiho
Copy link
Copy Markdown
Member

@sanposhiho sanposhiho commented Nov 4, 2023

add the doc for matchLabelKeys/mismatchLabelKeys in pod (anti)affinity

ref: kubernetes/enhancements#3633

@k8s-ci-robot k8s-ci-robot added this to the 1.29 milestone Nov 4, 2023
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 4, 2023
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 4, 2023

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

Name Link
🔨 Latest commit a5ab229
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/6559475e49ce6800086fe684

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. language/en Issues or PRs related to English language labels Nov 4, 2023
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Nov 4, 2023
@sanposhiho
Copy link
Copy Markdown
Member Author

@dipesh-rawat
Copy link
Copy Markdown
Member

/sig scheduling

@k8s-ci-robot k8s-ci-robot added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Nov 4, 2023
Comment thread content/en/docs/reference/command-line-tools-reference/feature-gates.md Outdated
Comment thread content/en/docs/reference/command-line-tools-reference/feature-gates.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Copy link
Copy Markdown
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Thanks. Here's some more feedback to help get this PR ready to merge.

Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment on lines +436 to +439
labelSelector:
matchExpressions:
- key: tenant
operator: Exists
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's this labelSelector for?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So, it narrows down the scope of this pod anti affinity, otherwise this Pod will hate Pods from daemonsets as well, for example.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

otherwise this Pod will hate Pods from daemonsets as well, for example.

Wait, will it? I have to check if NotIn operator matches with the Pods which doesn't have the label in the first place.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Confirmed it will. So, in this usecase, this labelSelector is necessary to exclude Pods which aren't supposed to have tenant label (daemonsets)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't just tell the reviewers - you need to explain it (at least a little) to readers as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 4, 2023
@sanposhiho
Copy link
Copy Markdown
Member Author

Thanks all. I fixed them based on your all reviews.

Copy link
Copy Markdown
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Thanks.

This looks ready for tech review (SIG Scheduling).

Copy link
Copy Markdown
Contributor

@Princesso Princesso left a comment

Choose a reason for hiding this comment

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

Thanks for all the hard work @sanposhiho ! There are a few new comments. As soon as you're done fixing them, this PR is good to move to the next stage.

@Princesso
Copy link
Copy Markdown
Contributor

Princesso commented Nov 7, 2023

I see a commit with the latest changes. Thank you!
/assign SIG Scheduling

Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
Comment thread content/en/docs/concepts/scheduling-eviction/assign-pod-node.md Outdated
@sanposhiho
Copy link
Copy Markdown
Member Author

@alculquicondor Thanks, done based on your reviews.

Copy link
Copy Markdown
Member

@alculquicondor alculquicondor 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 Nov 20, 2023
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 69b1a0fa4cced737d0af49db61ff9f19786be7aa

@tengqm
Copy link
Copy Markdown
Contributor

tengqm commented Nov 20, 2023

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Nov 20, 2023
@tengqm
Copy link
Copy Markdown
Contributor

tengqm commented Nov 20, 2023

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tengqm

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 Nov 20, 2023
@k8s-ci-robot k8s-ci-robot merged commit 2ec25fb into kubernetes:dev-1.29 Nov 20, 2023
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/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants