Skip to content

Commit

Permalink
Merge pull request #17116 from aveshagarwal/master-pod-toleration-res…
Browse files Browse the repository at this point in the history
…trictions-issues

Automatic merge from submit-queue.

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

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.
  • Loading branch information
openshift-merge-robot authored Nov 2, 2017
2 parents 3ab472b + 83d3756 commit ea8f407
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea8f407

Please sign in to comment.