replica

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

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.

Jump to

Keyboard shortcuts

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