Documentation ¶
Index ¶
- func IsBasicResource(name corev1.ResourceName) bool
- func IsNodeUnschedulable(node *corev1.Node) bool
- func IsReady(node *corev1.Node) bool
- func NodeFit(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, ...) []error
- func NodeUtilization(pods []*corev1.Pod, resourceNames []corev1.ResourceName) map[corev1.ResourceName]*resource.Quantity
- func PodFitsAnyNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, ...) bool
- func PodFitsAnyOtherNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, ...) bool
- func PodFitsCurrentNode(nodeIndexer podutil.GetPodsAssignedToNodeFunc, pod *corev1.Pod, ...) bool
- func ReadyNodes(ctx context.Context, client clientset.Interface, ...) ([]*corev1.Node, error)
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 ¶
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 ¶
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.