Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUnschedulablePodsOfWorkload ¶ added in v1.1.0
func GetUnschedulablePodsOfWorkload(unstructObj *unstructured.Unstructured, threshold time.Duration, listers *ListerWrapper) (int32, error)
GetUnschedulablePodsOfWorkload will return how many unschedulable pods a workload derives.
func NodeMaxAvailableReplica ¶
func NodeMaxAvailableReplica(node *corev1.Node, pods []*corev1.Pod, request corev1.ResourceList) (int32, error)
NodeMaxAvailableReplica calculates max available replicas of a node, based on the pods assigned to the node and the request resource of the replica.
Types ¶
type ListerWrapper ¶ added in v1.1.0
type ListerWrapper struct { listcorev1.PodLister listappsv1.ReplicaSetLister }
ListerWrapper is a wrapper which wraps the pod lister and replicaset lister.
Click to show internal directories.
Click to hide internal directories.