workloadmanager

package
v1.35.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSchedulingTimeoutDuration = 5 * time.Minute

DefaultSchedulingTimeoutDuration defines how long the gang pods should wait at the Permit stage for a quorum before being rejected. Variable is exported only for testing purposes.

Functions

func New

func New() *workloadManager

New initializes a new workload manager and returns it.

Types

type WorkloadManager

type WorkloadManager interface {
	fwk.WorkloadManager

	// AddPod is called by the scheduler when a Pod/Add event is observed.
	AddPod(pod *v1.Pod)
	// UpdatePod is called by the scheduler when a Pod/Update event is observed.
	UpdatePod(oldPod, newPod *v1.Pod)
	// DeletePod is called by the scheduler when a Pod/Delete event is observed.
	DeletePod(pod *v1.Pod)
}

WorkloadManager is the central source of truth for the state of pods belonging to Workload objects. It is designed to be driven explicitly by the scheduler's event handlers to ensure thread safety and avoid race conditions with the main scheduling queue. Note: The current implementation assumes that pod.Spec.Workload is immutable. Allowing mutability would require changes to the manager, e.g., by properly handling pod updates.

Jump to

Keyboard shortcuts

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