Skip to content

[KEP-5282]Add KEP for Implicit Tolerations #5389

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cici37
Copy link
Contributor

@cici37 cici37 commented Jun 9, 2025

  • One-line PR description:
  • Other comments:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 9, 2025
@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Jun 9, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cici37
Once this PR has been reviewed and has the lgtm label, please assign johnbelamaric 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 the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Jun 9, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Scheduling Jun 9, 2025
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 9, 2025
@cici37
Copy link
Contributor Author

cici37 commented Jun 9, 2025

/assign @dom4ha @johnbelamaric @sanposhiho

@mortent
Copy link
Member

mortent commented Jun 9, 2025

/wg device-management

@k8s-ci-robot k8s-ci-robot added the wg/device-management Categorizes an issue or PR as relevant to WG Device Management. label Jun 9, 2025
@pohly pohly moved this from 🆕 New to 👀 In review in Dynamic Resource Allocation Jun 10, 2025
@cici37 cici37 mentioned this pull request Jun 6, 2025
4 tasks
@sanposhiho
Copy link
Member

We will take a look, but very likely we cannot make it by the KEP freeze because our bandwidth is limited and there are other on-going KEPs.


## Proposal

Introduce a new PreEnqueue scheduler plugin (or extend the existing TaintToleration plugin) that:
Copy link
Member

Choose a reason for hiding this comment

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

Isn't PreEnqueue too early? In case of PrioritizedAlternatives we may have tainted GPU listed as only one of the options. If we put toleration too early, we (very theoretically) could schedule a pod on tainted node but not use that resource for which the node was tainted.

Alternatively, as mentioned before, tolerations could be also fully implicit (based on policy configuration similar to DeviceTaintRule) and "applied" invisibly by the TaintToleration plugin during the Filtering phase. However, the problem is that during the Filtering phase in the TaintToleration plugin we may not know which devices got allocated by the DRA plugin, so it may be hard to take decision based on it.

This is why I think that tainting nodes is not the best way to prevent scheduling pods on nodes with scarce resources. Ideally picking or discarding nodes with scarce unused resources should be rather based on scoring mechanisms, or filtering, which could block some placements based on custom policies. So if we forget about taints and toleration mechanism, such logic could be implemented inside DRA plugin.

@dom4ha
Copy link
Member

dom4ha commented Jun 12, 2025

We will take a look, but very likely we cannot make it by the KEP freeze because our bandwidth is limited and there are other on-going KEPs.

I agree with @sanposhiho , but also I think there will be ton of code changes in this cycle, which will be very challenging to handle. I'm not convinced that the use case really justifies the effort, as it's not clear to me whether taints and tolerations should be the solution we recommend.


Introduce a new PreEnqueue scheduler plugin (or extend the existing TaintToleration plugin) that:

- Depends on the DRA PreEnqueue plugin to ensure all ResourceClaims and DeviceClasses are resolved.
Copy link
Member

Choose a reason for hiding this comment

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

what if there are multiple resolutions possible? Will we remove all tolerations so scheduler can decide later where to schedule?

@cici37
Copy link
Contributor Author

cici37 commented Jun 17, 2025

The KEP is discussed in the latest sig scheduling meeting: #5282 (comment) and we'll hold the merge til get an agreement on the use case support.

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. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. wg/device-management Categorizes an issue or PR as relevant to WG Device Management.
Projects
Status: 👀 In review
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

7 participants