Documentation ¶
Overview ¶
The scheduler is responsible for placing virtual pod (VPod) replicas within real pods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotEnoughReplicas = errors.New("scheduling failed (not enough pod replicas)")
)
Functions ¶
func GetPlacementForPod ¶
func GetPlacementForPod(placements []duckv1alpha1.Placement, podName string) *duckv1alpha1.Placement
GetPlacementForPod returns the placement corresponding to podName
func GetPodCount ¶ added in v0.22.4
func GetPodCount(placements []duckv1alpha1.Placement) int
GetPodCount returns the number of pods with the given placements
func GetTotalVReplicas ¶
func GetTotalVReplicas(placements []duckv1alpha1.Placement) int32
GetTotalVReplicas returns the total number of placed virtual replicas
Types ¶
type Scheduler ¶
type Scheduler interface { // Schedule computes the new set of placements for vpod. Schedule(vpod VPod) ([]duckv1alpha1.Placement, error) }
Scheduler is responsible for placing VPods into real Kubernetes pods
type VPod ¶
type VPod interface { // GetKey returns the VPod key (namespace/name). GetKey() types.NamespacedName // GetVReplicas returns the number of expected virtual replicas GetVReplicas() int32 // GetPlacements returns the current list of placements // Do not mutate! GetPlacements() []duckv1alpha1.Placement }
VPod represents virtual replicas placed into real Kubernetes pods The scheduler is responsible for placing VPods
type VPodLister ¶
VPodLister is the function signature for returning a list of VPods
Click to show internal directories.
Click to hide internal directories.