@@ -121,16 +121,22 @@ may not be the intention of an operator. On the other hand, a proper Default for
121
121
could provide the same priority as ` SelectorSpreadingPriority ` . Thus, there's no need for the
122
122
features to co-exist.
123
123
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.
134
140
135
141
### Risks and Mitigations
136
142
0 commit comments