Documentation
¶
Index ¶
- func GetBestNodeWeightGivenPodPreferredAffinity(pod *v1.Pod, nodes []*v1.Node) int32
- func GetNodeWeightGivenPodPreferredAffinity(pod *v1.Pod, node *v1.Node) int32
- func IsBasicResource(name v1.ResourceName) bool
- func IsNodeUnschedulable(node *v1.Node) bool
- func IsReady(node *v1.Node) bool
- func NodeFit(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, node *v1.Node) []error
- func NodeUtilization(pods []*v1.Pod, resourceNames []v1.ResourceName) map[v1.ResourceName]*resource.Quantity
- func PodFitsAnyNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, nodes []*v1.Node) bool
- func PodFitsAnyOtherNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, nodes []*v1.Node) bool
- func PodFitsCurrentNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, node *v1.Node) bool
- func PodMatchNodeSelector(pod *v1.Pod, node *v1.Node) bool
- func ReadyNodes(ctx context.Context, client clientset.Interface, ...) ([]*v1.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBestNodeWeightGivenPodPreferredAffinity ¶ added in v0.28.0
GetBestNodeWeightGivenPodPreferredAffinity returns the best weight (maximum one) that the pod gives to the best node by analyzing the soft node affinity of that pod (nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution)
func GetNodeWeightGivenPodPreferredAffinity ¶ added in v0.28.0
GetNodeWeightGivenPodPreferredAffinity returns the weight that the pod gives to a node by analyzing the soft node affinity of that pod (nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution)
func IsBasicResource ¶ added in v0.24.0
func IsBasicResource(name v1.ResourceName) bool
IsBasicResource checks if resource is basic native.
func IsNodeUnschedulable ¶ added in v0.10.0
IsNodeUnschedulable checks if the node is unschedulable. This is a helper function to check only in case of underutilized node so that they won't be accounted for.
func NodeFit ¶ added in v0.24.0
NodeFit returns true if the provided pod can be scheduled onto the provided node. This function is used when the NodeFit pod filtering feature of the Descheduler is enabled. This function currently considers a subset of the Kubernetes Scheduler's predicates when deciding if a pod would fit on a node, but more predicates may be added in the future.
func NodeUtilization ¶ added in v0.24.0
func NodeUtilization(pods []*v1.Pod, resourceNames []v1.ResourceName) map[v1.ResourceName]*resource.Quantity
NodeUtilization returns the resources requested by the given pods. Only resources supplied in the resourceNames parameter are calculated.
func PodFitsAnyNode ¶ added in v0.5.0
func PodFitsAnyNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, nodes []*v1.Node) bool
PodFitsAnyNode checks if the given pod will fit any of the given nodes. The predicates used to determine if the pod will fit can be found in the NodeFit function.
func PodFitsAnyOtherNode ¶ added in v0.21.0
func PodFitsAnyOtherNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, nodes []*v1.Node) bool
PodFitsAnyOtherNode checks if the given pod will fit any of the given nodes, besides the node the pod is already running on. The predicates used to determine if the pod will fit can be found in the NodeFit function.
func PodFitsCurrentNode ¶ added in v0.5.0
func PodFitsCurrentNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, node *v1.Node) bool
PodFitsCurrentNode checks if the given pod will fit onto the given node. The predicates used to determine if the pod will fit can be found in the NodeFit function.
func PodMatchNodeSelector ¶ added in v0.28.0
PodMatchNodeSelector checks if a pod node selector matches the node label.
Types ¶
This section is empty.