package helper
import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper"
Index ¶
- func DefaultNormalizeScore(maxPriority int64, reverse bool, scores framework.NodeScoreList) *framework.Status
- func DefaultSelector(pod *v1.Pod, sl corelisters.ServiceLister, cl corelisters.ReplicationControllerLister, rsl appslisters.ReplicaSetLister, ssl appslisters.StatefulSetLister) labels.Selector
- func GetPodServices(sl corelisters.ServiceLister, pod *v1.Pod) ([]*v1.Service, error)
- func PodMatchesNodeSelectorAndAffinityTerms(pod *v1.Pod, node *v1.Node) bool
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 DefaultSelector ¶
func DefaultSelector(pod *v1.Pod, sl corelisters.ServiceLister, cl corelisters.ReplicationControllerLister, rsl appslisters.ReplicaSetLister, ssl appslisters.StatefulSetLister) labels.Selector
DefaultSelector returns a selector deduced from the Services, Replication Controllers, Replica Sets, and Stateful Sets matching the given pod.
func GetPodServices ¶
func GetPodServices(sl corelisters.ServiceLister, pod *v1.Pod) ([]*v1.Service, error)
GetPodServices gets the services that have the selector that match the labels on the given pod.
func PodMatchesNodeSelectorAndAffinityTerms ¶
PodMatchesNodeSelectorAndAffinityTerms checks whether the pod is schedulable onto nodes according to the requirements in both NodeAffinity and nodeSelector.
Source Files ¶
node_affinity.go normalize_score.go spread.go
- Version
- v1.19.5
- Published
- Dec 4, 2020
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 18 minutes ago –
Tools for package owners.