node

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBasicResource

func IsBasicResource(name corev1.ResourceName) bool

IsBasicResource checks if resource is basic native.

func IsNodeUnschedulable

func IsNodeUnschedulable(node *corev1.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 *corev1.Node) bool

IsReady checks if the descheduler could run against given node.

func NodeFit

func NodeFit(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, node *corev1.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

func NodeUtilization(pods []*corev1.Pod, resourceNames []corev1.ResourceName) map[corev1.ResourceName]*resource.Quantity

NodeUtilization returns the resources requested by the given pods. Only resources supplied in the resourceNames parameter are calculated.

func PodFitsAnyNode

func PodFitsAnyNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, nodes []*corev1.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

func PodFitsAnyOtherNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, nodes []*corev1.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

func PodFitsCurrentNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, node *corev1.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 ReadyNodes

func ReadyNodes(ctx context.Context, client clientset.Interface, nodeInformer coreinformers.NodeInformer, nodeSelector string) ([]*corev1.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