doc.go 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. /*
  2. Copyright 2018 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Package podtolerationrestriction is a plugin that first verifies
  14. // any conflict between a pod's tolerations and its namespace's
  15. // tolerations, and rejects the pod if there's a conflict. If there's
  16. // no conflict, the pod's tolerations are merged with its namespace's
  17. // toleration. Resulting pod's tolerations are verified against its
  18. // namespace's whitelist of tolerations. If the verification is
  19. // successful, the pod is admitted otherwise rejected. If a namespace
  20. // does not have associated default or whitelist of tolerations, then
  21. // cluster level default or whitelist of tolerations are used instead
  22. // if specified. Tolerations to a namespace are assigned via
  23. // scheduler.alpha.kubernetes.io/defaultTolerations and
  24. // scheduler.alpha.kubernetes.io/tolerationsWhitelist annotations
  25. // keys.
  26. package podtolerationrestriction // import "k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction"