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 per-priority class default tolerations #1686

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

severinson
Copy link
Contributor

No description provided.

}
for _, defaultToleration := range server.schedulingConfig.DefaultJobTolerations {
podToleration, ok := podTolerations[defaultToleration.Key]
if !ok || !defaultToleration.MatchToleration(&podToleration) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an optimisation to avoid adding redundant tolerations. I don't think it's necessary and have removed it. This optimisation would not even remove all duplicate taints. Since there may be several tolerations with the same key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Duplicate tolerations should we safe. Since the code that checks for tolerations just loops over the existing tolerations to check if any of them tolerates a given taint.

@severinson severinson merged commit cfd4dee into master Oct 21, 2022
@severinson severinson deleted the severinson/per-pc-tolerations branch October 21, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants