preemption

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InCohortReclamationReason           string = "InCohortReclamation"
	InCohortFairSharingReason           string = "InCohortFairSharing"
	InCohortReclaimWhileBorrowingReason string = "InCohortReclaimWhileBorrowing"
)

In cohort preemption reasons

View Source
const (
	InClusterQueueReason string = "InClusterQueue"
)

In cluster queue preemption reasons

Variables

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

Functions

This section is empty.

Types

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) *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