Skip to content

Commit 6cb66a5

Browse files
Specify semantics of SelectorSpreadingPriority
Signed-off-by: Aldo Culquicondor <[email protected]>
1 parent 4d55c62 commit 6cb66a5

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

keps/sig-scheduling/20190926-default-even-pod-spreading.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,22 @@ may not be the intention of an operator. On the other hand, a proper Default for
121121
could provide the same priority as `SelectorSpreadingPriority`. Thus, there's no need for the
122122
features to co-exist.
123123

124-
Give that we guard Default `topologySpreadConstraints` behind a feature flag,
125-
these would be its semantics:
126-
127-
- If the feature is enabled, `SelectorSpreadingPriority` is removed from the default set of priorities.
128-
K8s provides the Default `topologySpreadConstraints` that matches the priority given by
129-
`SelectorSpreading` if the cluster operator doesn't specify one.
130-
- If the cluster operator provides a Policy that includes `SelectorSpreadingPriority` and
131-
`EvenPodsSpreadPriority`, K8s provides an empty Default `topologySpreadConstraints`.
132-
The cluster operator can still specify Default `topologySpreadConstraints`,
133-
in which case both priorities run.
124+
K8s will set Default `topologySpreadConstraints` and remove `SelectorSpreadingPriority`
125+
from the k8s providers (`DefaultProvider` and `ClusterAutoscalerProvider`). The set
126+
[default](#default-rules) will have a similar effect.
127+
128+
If an operator sets a Policy, these are the semantics of the presence of `SelectorSpreadingPriority`
129+
and/or `EvenPodsSpreadPriority`:
130+
131+
| SelectorSpreading | EvenPodsSpread | Valid | Pod spread constraints |
132+
| :---------------: | :------------: | :---: | :---------------------------------------: |
133+
| N | Y | Yes | provided or [k8s default](#default-rules) |
134+
| Y | Y | Yes | provided or [k8s default](#default-rules) |
135+
| N | N | Yes | None |
136+
| Y | N | No | - |
137+
138+
Selecting `SelectorSpreadingPriority` but not `EvenPodsSpreadPriority` in a policy is an invalid
139+
configuration, because the latter is a requirement for the former.
134140

135141
### Risks and Mitigations
136142

0 commit comments

Comments
 (0)