node

package
v0.30.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBestNodeWeightGivenPodPreferredAffinity added in v0.28.0

func GetBestNodeWeightGivenPodPreferredAffinity(pod *v1.Pod, nodes []*v1.Node) int32

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

func GetNodeWeightGivenPodPreferredAffinity(pod *v1.Pod, node *v1.Node) int32

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

func IsNodeUnschedulable(node *v1.Node) bool

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 IsReady

func IsReady(node *v1.Node) bool

IsReady checks if the descheduler could run against given node.

func NodeFit added in v0.24.0

func NodeFit(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *v1.Pod, node *v1.Node) []error

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

func PodMatchNodeSelector(pod *v1.Pod, node *v1.Node) bool

PodMatchNodeSelector checks if a pod node selector matches the node label.

func ReadyNodes

func ReadyNodes(ctx context.Context, client clientset.Interface, nodeLister listersv1.NodeLister, nodeSelector string) ([]*v1.Node, error)

ReadyNodes returns ready nodes irrespective of whether they are schedulable or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL