Skip to content

Commit

Permalink
rename FromLowerPriority to LowerPriorityOnly
Browse files Browse the repository at this point in the history
Change-Id: I2060fee01e5618c2d452846ecbe18581e232e4ec
  • Loading branch information
alculquicondor committed Nov 23, 2022
1 parent bcd74ae commit e6801eb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions keps/83-workload-preemption/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ metadata:
spec:
preemption:
withinCohort: Always
withinClusterQueue: FromLowerPriority
withinClusterQueue: LowerPriorityOnly
```
### Notes/Contraints/Caveats (Optional)
Expand Down Expand Up @@ -211,30 +211,30 @@ type ClusterQueueSpec struct {
type PreemptionPolicy string
const (
PreemptionPoliyNever = "Never"
PreemptionPoliyFromLowerPriority = "FromLowerPriority"
PreemptionPoliyAlways = "Always"
PreemptionPoliyNever = "Never"
PreemptionPoliyLowerPriorityOnly = "LowerPriorityOnly"
PreemptionPoliyAlways = "Always"
)
type ClusterQueuePreemption struct {
// reclaimBorrowedQuota determines whether a pending Workloas, that fits
// withinCohort determines whether a pending Workload, that fits
// in the min quota for its ClusterQueue, can preempt Workloads from other
// ClusterQueues in the cohort that are using more than their min quota.
// Possible values are:
// - `Never` (default): do not preempt workloads in the cohort.
// - `FromLowerPriority`: only preempt workloads in the cohort that have lower
// - `LowerPriorityOnly`: only preempt workloads in the cohort that have lower
// priority than the pending Workload.
// - `Always`: preempt any workload in the cohort.
withinCohort *PreemptionPolicy
WithinCohort PreemptionPolicy

// withinClusterQueue determines whether a pending workload that doesn't fit
// within the min quota for its ClusterQueue, can preempt active Workloads in
// the ClusterQueue.
// Possible values are:
// - `Never` (default): do not preempt workloads in the ClusterQueue.
// - `FromLowerPriority`: only preempt workloads in the ClusterQueue that have
// lower priority than the pendingWorkload.
withinClusterQueue *PreemptionPolicy
// - `LowerPriorityOnly`: only preempt workloads in the ClusterQueue that have
// lower priority than the pendingWorkload.
WithinClusterQueue PreemptionPolicy
}
```

Expand Down Expand Up @@ -338,7 +338,7 @@ The algorithm goes like follows:

1. For preemption within cohort, we restrict the list to Workloads with lower
priority than the pending Workload if
`.preemption.withinCohort=FromLowerPriority`
`.preemption.withinCohort=LowerPriorityOnly`
2. For preemption within ClusterQueue, we only select Workloads with lower
priority than the pending Workload.

Expand Down

0 comments on commit e6801eb

Please sign in to comment.