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

Updated the podAffinity concept documentation #48083

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

aryasoni98
Copy link

@aryasoni98 aryasoni98 commented Sep 25, 2024

Description


Summary of Changes

  1. Added "Existing Pods' Affinity and Anti-Affinity Considerations" Section:

    • This section outlines how the scheduler considers both incoming Pod's and existing Pods' podAffinity and podAntiAffinity fields.
    • It categorizes them into Hard Constraints, Soft Constraints, and Ignored Fields for clarity.
  2. Updated "Inter-pod affinity and anti-affinity" Section:

    • Incorporated the considerations for existing Pods' affinity and anti-affinity rules.
    • Explained how these existing rules influence the scheduling decisions for incoming Pods.
  3. Ensured Consistency and Clarity:

    • The added sections are seamlessly integrated into the existing documentation structure.
    • Maintained the documentation style and formatting for coherence.

Issue

Closes: #47922

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 25, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @aryasoni98!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 25, 2024
Copy link

netlify bot commented Sep 25, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 2f24668
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/6721c24614dff7000880864e
😎 Deploy Preview https://deploy-preview-48083--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.

@alculquicondor
Copy link
Member

cc @dom4ha

Copy link
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.

it looks good overall from a technical perspective, but maybe tech writers can help determine whether the same idea can be communicated more concisely?

@aryasoni98
Copy link
Author

it looks good overall from a technical perspective, but maybe tech writers can help determine whether the same idea can be communicated more concisely?

Thank you for your valuable feedback! I agree that clarity and conciseness are essential for effective documentation. I'll collaborate with our technical writers to streamline the content while ensuring all critical information is accurately conveyed. If you have any specific suggestions or areas you'd like us to focus on, please let me know!

@sftim
Copy link
Contributor

sftim commented Sep 25, 2024

/hold

We prefer not to put issue references in commit messages or PR titles (it causes trouble if / when people fork the repository).

OK to unhold when that's fixed.
@aryasoni98 do you know what to do to omit this information? If not, help is available.

@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 Sep 25, 2024
@aryasoni98
Copy link
Author

/hold

We prefer not to put issue references in commit messages or PR titles (it causes trouble if / when people fork the repository).

OK to unhold when that's fixed. @aryasoni98 do you know what to do to omit this information? If not, help is available.

@sftim Thank you for the feedback! I understand that including issue references in commit messages and PR titles can cause complications, especially with repository forks. I will update the commit messages and PR titles to omit these references accordingly.
If there are specific guidelines or best practices you'd like me to follow for linking issues without including them directly in commit messages or PR titles, please let me know. I'm happy to make the necessary adjustments to ensure compliance with the repository standards.
Thanks again for pointing this out!

@aryasoni98 aryasoni98 changed the title Missing description in the podAffinity concept documentation #47922 Missing description in the podAffinity concept documentation Sep 28, 2024
@aryasoni98 aryasoni98 changed the title Missing description in the podAffinity concept documentation Missing description in the podAffinity concept documentation Sep 28, 2024
- mismatchLabelKeys:
- tenant # whatever the value of the "tenant" label for this Pod, prevent
# scheduling to nodes in any pool where any Pod from a different
# tenant is running.
labelSelector:
# We have to have the labelSelector which selects only Pods with the tenant label,
# otherwise this Pod would hate Pods from daemonsets as well, for example,
# otherwise this Pod would anti-affine Pods from daemonsets as well, for example,
Copy link
Member

Choose a reason for hiding this comment

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

Oh, that was not a good word for the concept, but affine is not a word, so, maybe this:

Suggested change
# otherwise this Pod would anti-affine Pods from daemonsets as well, for example,
# otherwise this Pod would have anti-affinity against Pods from daemonsets as well, for example,

Copy link
Author

@aryasoni98 aryasoni98 Oct 1, 2024

Choose a reason for hiding this comment

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

Thank you for catching that! You're absolutely right—using "affine" in that context isn't appropriate. I'll update the comment to:

otherwise this Pod would have anti-affinity against Pods from daemonsets as well, for example,

This change makes the comment clearer and more accurate. I appreciate your suggestion!

@aryasoni98
Copy link
Author

@alculquicondor @sftim When you have a moment, could you kindly review my PR and let me know if there are any updates or changes needed? Your feedback is greatly appreciated.

@T-Lakshmi
Copy link
Contributor

T-Lakshmi commented Oct 3, 2024

Hello @aryasoni98,

We prefer not to put issue references in commit messages

I will update the commit messages and PR titles to omit these references accordingly.

I still see commit messages are referencing issue #47922. Can you please squash your commits into one and update final message to not include references.

@T-Lakshmi
Copy link
Contributor

T-Lakshmi commented Oct 3, 2024

@aryasoni98,
For quick guidance how to squash multiple commits into single commit, refer this link.
Thanks,

@aryasoni98
Copy link
Author

@aryasoni98, For quick guidance how to squash multiple commits into single commit, refer this link. Thanks,

Thank you for bringing this to my attention. I apologize for the oversight. I will squash my commits into one and update the final commit message to remove any references to issue #47922, ensuring it aligns with the repository guidelines.
Please let me know if there's anything else I should address.

@aryasoni98
Copy link
Author

@aryasoni98,
For quick guidance how to squash multiple commits into single commit, refer this link.
Thanks,

Thank you for the guidance and the link. I appreciate your assistance. I'll follow the instructions to squash my commits into a single commit and update the final commit message to remove any references to the issue.

@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 Oct 3, 2024
@aryasoni98
Copy link
Author

@davidopp @alculquicondor @T-Lakshmi Just wanted to follow up on the PR—everything is looking good on your end, and no further changes are needed. Could you please review it when you have a moment? If all looks good to you, feel free to go ahead and merge.

@aryasoni98 aryasoni98 changed the title Missing description in the podAffinity concept documentation Updated the podAffinity concept documentation Oct 14, 2024
@aryasoni98
Copy link
Author

@aryasoni98,

image

Change commit message to Updated the podAffinity concept documentation Intention here is to remove reference kubernetes #47922 from commit message.

@T-Lakshmi

I believe I've addressed all the feedback and resolved the issues you've pointed out. The commit history has been cleaned up, and all unnecessary references have been removed as per the repository guidelines.

Please review the latest changes at your convenience and let me know if there's anything else that needs attention.

Thank you for your guidance and assistance!

- Incoming Pod's `podAffinity` or `podAntiAffinity` with `requiredDuringSchedulingIgnoredDuringExecution`:
The scheduler ensures the new Pod is assigned to nodes that satisfy these required affinity and anti-affinity rules based on existing Pods.
- Existing Pods' `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
Treated as hard constraints, filtering out nodes that violate existing Pods' required anti-affinity rules.
Copy link
Contributor

Choose a reason for hiding this comment

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

The requiredDuringSchedulingIgnoredDuringExecution property, as its name suggests,
is not supposed impact an existing Pod.
In Kubernetes, Pods are by default scheduled only once. I'm not sure when the scheduler
will "filter out nodes" for an existing Pod.

With that, I think there are things to improve in the organization of these constraints/conditions.

Copy link
Author

Choose a reason for hiding this comment

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

I believe I have addressed all the feedback and resolved the issues you pointed out. The commit history has been cleaned up, and all unnecessary references have been removed as per the repository guidelines. Additionally, the documentation has been reorganized for better clarity and understanding.

Please review the latest changes at your convenience and let me know if there's anything else that needs attention.

Thank you for your guidance and assistance!

@T-Lakshmi
Copy link
Contributor

As per

OK to unhold when that's fixed.

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 15, 2024
@T-Lakshmi
Copy link
Contributor

/remove-language es
/remove-language de
/remove-language ko
/remove-language pt
/remove-language zh

@k8s-ci-robot k8s-ci-robot removed language/es Issues or PRs related to Spanish language language/de Issues or PRs related to German language language/ko Issues or PRs related to Korean language language/pt Issues or PRs related to Portuguese language language/zh Issues or PRs related to Chinese language labels Oct 15, 2024
@T-Lakshmi
Copy link
Contributor

/remove-area blog
/remove-area localization

@k8s-ci-robot k8s-ci-robot removed area/blog Issues or PRs related to the Kubernetes Blog subproject area/localization General issues or PRs related to localization labels Oct 15, 2024
@alculquicondor
Copy link
Member

There are still unresolved comments from my side that are marked as resolved in the UI.

@aryasoni98
Copy link
Author

There are still unresolved comments from my side that are marked as resolved in the UI.

Could you please pin the unresolved issues for me and mark them as resolved

@alculquicondor
Copy link
Member

@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 Oct 16, 2024
Updated the podAffinity concept documentation

Updated the podAffinity concept documentation
@aryasoni98
Copy link
Author

@alculquicondor @sftim @T-Lakshmi Just wanted to follow up on the PR—everything is looking good on your end, and no further changes are needed. Could you please review it when you have a moment? If all looks good to you, feel free to go ahead and merge.

Copy link
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 for the work so far.

Watch out for writing like an AI language model; we try to use a human tone of voice.

Please review the pending feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing description in the podAffinity concept documentation
6 participants