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

Add usage for per-profile node affinity #24914

Merged

Conversation

alculquicondor
Copy link
Member

@alculquicondor alculquicondor commented Nov 5, 2020

/sig scheduling

Implementation PR: kubernetes/kubernetes#96202

Ref kubernetes/kubernetes#95738

@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. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 5, 2020
@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Nov 5, 2020

Deploy preview for kubernetes-io-vnext-staging processing.

Building with commit 45da527

https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/5faae0990c9933000803d2c8

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

annajung commented Nov 5, 2020

/milestone 1.20
/hold pending merge kubernetes/kubernetes#96202

@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 Nov 5, 2020
@k8s-ci-robot k8s-ci-robot added this to the 1.20 milestone Nov 5, 2020
@annajung
Copy link
Contributor

annajung commented Nov 5, 2020

/assign

@alculquicondor alculquicondor changed the title WIP Add usage for inherent node affinity WIP Add usage for per-profile node affinity Nov 6, 2020
@alculquicondor alculquicondor changed the title WIP Add usage for per-profile node affinity Add usage for per-profile node affinity Nov 9, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 9, 2020
@alculquicondor
Copy link
Member Author

/assign @Huang-Wei

Copy link
Member

@Huang-Wei Huang-Wei left a comment

Choose a reason for hiding this comment

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

Just one nit. LGTM otherwise.

@annajung
Copy link
Contributor

/hold cancel
k/k merged

@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 Nov 10, 2020
@Goclipse27
Copy link
Contributor

@annajung - is this PR you are referring merged k/k merged? kubernetes/kubernetes#96202.

Kindly mention in your comment , thanks.

@Goclipse27
Copy link
Contributor

/lgtm

@k8s-ci-robot
Copy link
Contributor

@raghvenders: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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/test-infra repository.

@alculquicondor
Copy link
Member Author

alculquicondor commented Nov 10, 2020 via email

@Goclipse27
Copy link
Contributor

Thanks @alculquicondor.On a note , reviewers or approves can do anyways not me.

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.

Some feedback. I wasn't clear on why someone might want to configure the NodeAffinity plugin the way that this PR suggests.

recommend to use node labels that have clear correlation with the profile's scheduler name.

{{< note >}}
The Daemonset controller, which [creates Pods for Daemonsets](/docs/concepts/workloads/controllers/daemonset/#scheduled-by-default-scheduler)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
The Daemonset controller, which [creates Pods for Daemonsets](/docs/concepts/workloads/controllers/daemonset/#scheduled-by-default-scheduler)
The DaemonSet controller, which [creates Pods for DaemonSets](/docs/concepts/workloads/controllers/daemonset/#scheduled-by-default-scheduler)

AIUI the DaemonSet controller sets a NodeAffinity on the Pods it creates and otherwise gets out of the way. So is this really about handling Pods with narrow NodeAffinity?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is correct, but it's generally up to the user to fix narrow affinities. They can do that once they observe the failed scheduling event.
But DaemonSet Pods might be particularly confusing because there's a k8s controller that creates them.

Comment on lines 165 to 168
When configuring multiple [scheduling profiles](/docs/reference/scheduling/config/#multiple-profiles), you can associate
a profile with a Node affinity. To do so, add an `addedAffinity` to the args of the [`NodeAffinity` plugin](/docs/reference/scheduling/config/#scheduling-plugins)
in the [scheduler configuration](/docs/reference/scheduling/config/). For example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why might you want to do this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

@Huang-Wei
Copy link
Member

/lgtm
from scheduling side.

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

LGTM label has been added.

Git tree hash: 7914970c489f6c98f4428dfc3b234cbc06289582

Copy link
Member

@irvifa irvifa left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irvifa

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit cf5cc96 into kubernetes:dev-1.20 Nov 11, 2020
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
None yet
Development

Successfully merging this pull request may close these issues.

8 participants