priorities.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 priorities
  14. const (
  15. // EqualPriority defines the name of prioritizer function that gives an equal weight of one to all nodes.
  16. EqualPriority = "EqualPriority"
  17. // MostRequestedPriority defines the name of prioritizer function that gives used nodes higher priority.
  18. MostRequestedPriority = "MostRequestedPriority"
  19. // RequestedToCapacityRatioPriority defines the name of RequestedToCapacityRatioPriority.
  20. RequestedToCapacityRatioPriority = "RequestedToCapacityRatioPriority"
  21. // SelectorSpreadPriority defines the name of prioritizer function that spreads pods by minimizing
  22. // the number of pods (belonging to the same service or replication controller) on the same node.
  23. SelectorSpreadPriority = "SelectorSpreadPriority"
  24. // ServiceSpreadingPriority is largely replaced by "SelectorSpreadPriority".
  25. ServiceSpreadingPriority = "ServiceSpreadingPriority"
  26. // InterPodAffinityPriority defines the name of prioritizer function that decides which pods should or
  27. // should not be placed in the same topological domain as some other pods.
  28. InterPodAffinityPriority = "InterPodAffinityPriority"
  29. // LeastRequestedPriority defines the name of prioritizer function that prioritize nodes by least
  30. // requested utilization.
  31. LeastRequestedPriority = "LeastRequestedPriority"
  32. // BalancedResourceAllocation defines the name of prioritizer function that prioritizes nodes
  33. // to help achieve balanced resource usage.
  34. BalancedResourceAllocation = "BalancedResourceAllocation"
  35. // NodePreferAvoidPodsPriority defines the name of prioritizer function that priorities nodes according to
  36. // the node annotation "scheduler.alpha.kubernetes.io/preferAvoidPods".
  37. NodePreferAvoidPodsPriority = "NodePreferAvoidPodsPriority"
  38. // NodeAffinityPriority defines the name of prioritizer function that prioritizes nodes which have labels
  39. // matching NodeAffinity.
  40. NodeAffinityPriority = "NodeAffinityPriority"
  41. // TaintTolerationPriority defines the name of prioritizer function that prioritizes nodes that marked
  42. // with taint which pod can tolerate.
  43. TaintTolerationPriority = "TaintTolerationPriority"
  44. // ImageLocalityPriority defines the name of prioritizer function that prioritizes nodes that have images
  45. // requested by the pod present.
  46. ImageLocalityPriority = "ImageLocalityPriority"
  47. // ResourceLimitsPriority defines the nodes of prioritizer function ResourceLimitsPriority.
  48. ResourceLimitsPriority = "ResourceLimitsPriority"
  49. // Custom Resource Priority
  50. CustomRequestedPriority = "CustomRequestedPriority"
  51. )