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

Allow override of cluster level (default, whitelist) tolerations by namespace level empty (default, whitelist) tolerations. #17116

Conversation

aveshagarwal
Copy link
Contributor

Currently In PodTolerationRestriction admission plugin, if namespace level default and whitelist of tolerations are nil or empty, they do not override cluster level default and whitelist tolerations.

This PR fixes the plugin to not override cluster level tolerations only when namespace level toleration are nil. IOW, if namespace level toleration are empty, they override cluster level tolerations. To be more clear, if following annotations are set to empty, they override cluster level tolerations.

scheduler.alpha.kubernetes.io/defaultTolerations : ""
scheduler.alpha.kubernetes.io/tolerationsWhitelist: ""

This behavior is inline with PodNodeSelector admission plugin too.

@sjenning

I think its important to get it fixed for 3.7 so creating this backport PR even though the upstream PR is not merged yet.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 31, 2017
@openshift-merge-robot openshift-merge-robot added the vendor-update Touching vendor dir or related files label Oct 31, 2017
@bparees
Copy link
Contributor

bparees commented Oct 31, 2017

/unassign

@aveshagarwal
Copy link
Contributor Author

/test unit

… tolerations by namespace level empty (default, whitelist) tolerations.
@aveshagarwal aveshagarwal force-pushed the master-pod-toleration-restrictions-issues branch from d8afb6f to 83d3756 Compare November 1, 2017 15:01
@aveshagarwal
Copy link
Contributor Author

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 1, 2017
@sjenning
Copy link
Contributor

sjenning commented Nov 1, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 1, 2017
@aveshagarwal
Copy link
Contributor Author

@derekwaynecarr could you approve it?

@derekwaynecarr
Copy link
Member

/approve

@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aveshagarwal, derekwaynecarr, sjenning

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2017
@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit ea8f407 into openshift:master Nov 2, 2017
@aveshagarwal aveshagarwal deleted the master-pod-toleration-restrictions-issues branch January 19, 2018 15:26
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. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. vendor-update Touching vendor dir or related files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants