preemption

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HumanReadablePreemptionReasons = map[string]string{
	kueue.InClusterQueueReason:                "prioritization in the ClusterQueue",
	kueue.InCohortReclamationReason:           "reclamation within the cohort",
	kueue.InCohortFairSharingReason:           "fair sharing within the cohort",
	kueue.InCohortReclaimWhileBorrowingReason: "reclamation within the cohort while borrowing",
}

Functions

This section is empty.

Types

type PreemptionOracle added in v0.8.1

type PreemptionOracle struct {
	// contains filtered or unexported fields
}

func NewOracle added in v0.8.1

func NewOracle(preemptor *Preemptor, snapshot *cache.Snapshot) *PreemptionOracle

func (*PreemptionOracle) IsReclaimPossible added in v0.8.1

func (p *PreemptionOracle) IsReclaimPossible(log logr.Logger, cq *cache.ClusterQueueSnapshot, wl workload.Info, fr resources.FlavorResource, quantity int64) bool

IsReclaimPossible determines if a ClusterQueue can fit this FlavorResource by reclaiming its nominal quota which it lent to its Cohort.

type Preemptor

type Preemptor struct {
	// contains filtered or unexported fields
}

func New

func New(
	cl client.Client,
	workloadOrdering workload.Ordering,
	recorder record.EventRecorder,
	fs config.FairSharing,
	clock clock.Clock,
) *Preemptor

func (*Preemptor) GetTargets added in v0.4.0

func (p *Preemptor) GetTargets(log logr.Logger, wl workload.Info, assignment flavorassigner.Assignment, snapshot *cache.Snapshot) []*Target

GetTargets returns the list of workloads that should be evicted in order to make room for wl.

func (*Preemptor) IssuePreemptions added in v0.4.0

func (p *Preemptor) IssuePreemptions(ctx context.Context, preemptor *workload.Info, targets []*Target) (int, error)

IssuePreemptions marks the target workloads as evicted.

func (*Preemptor) OverrideApply

func (p *Preemptor) OverrideApply(f func(context.Context, *kueue.Workload, string, string) error)

type Target added in v0.8.0

type Target struct {
	WorkloadInfo *workload.Info
	Reason       string
}

Jump to

Keyboard shortcuts

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