Documentation ¶
Index ¶
- func DefaultNormalizeScore(maxPriority int64, reverse bool, scores framework.NodeScoreList) *framework.Status
- func FindMatchingUntoleratedTaint(taints []v1.Taint, tolerations []v1.Toleration, ...) (v1.Taint, bool)
- func MatchNodeSelectorTerms(nodeSelectorTerms []v1.NodeSelectorTerm, nodeLabels labels.Set, ...) bool
- func NodeSelectorRequirementsAsFieldSelector(nsm []v1.NodeSelectorRequirement) (fields.Selector, error)
- func NodeSelectorRequirementsAsSelector(nsm []v1.NodeSelectorRequirement) (labels.Selector, error)
- func PodMatchesNodeSelectorAndAffinityTerms(pod *v1.Pod, node *v1.Node) bool
- func TolerationsTolerateTaint(tolerations []v1.Toleration, taint *v1.Taint) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultNormalizeScore ¶
func DefaultNormalizeScore(maxPriority int64, reverse bool, scores framework.NodeScoreList) *framework.Status
DefaultNormalizeScore generates a Normalize Score function that can normalize the scores to [0, maxPriority]. If reverse is set to true, it reverses the scores by subtracting it from maxPriority.
func MatchNodeSelectorTerms ¶
func MatchNodeSelectorTerms( nodeSelectorTerms []v1.NodeSelectorTerm, nodeLabels labels.Set, nodeFields fields.Set, ) bool
MatchNodeSelectorTerms checks whether the node labels and fields match node selector terms in ORed; nil or empty term matches no objects.
func NodeSelectorRequirementsAsFieldSelector ¶
func NodeSelectorRequirementsAsFieldSelector(nsm []v1.NodeSelectorRequirement) (fields.Selector, error)
NodeSelectorRequirementsAsFieldSelector converts the []NodeSelectorRequirement core type into a struct that implements fields.Selector.
func NodeSelectorRequirementsAsSelector ¶
func NodeSelectorRequirementsAsSelector(nsm []v1.NodeSelectorRequirement) (labels.Selector, error)
NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements labels.Selector.
func PodMatchesNodeSelectorAndAffinityTerms ¶
PodMatchesNodeSelectorAndAffinityTerms checks whether the pod is schedulable onto nodes according to the requirements in both NodeAffinity and nodeSelector.
func TolerationsTolerateTaint ¶
func TolerationsTolerateTaint(tolerations []v1.Toleration, taint *v1.Taint) bool
TolerationsTolerateTaint checks if taint is tolerated by any of the tolerations.
Types ¶
This section is empty.