@@ -183,14 +183,13 @@ demonstrate the interest in a KEP within the wider Kubernetes community.
183
183
184
184
[experience reports]: https://github.com/golang/go/wiki/ExperienceReports
185
185
-->
186
- Currently in calculating pod topology spread skew, we will ignore node taints
187
- as node with pod untolerated taints will also be taken into calculation. This
188
- behavior doesn't match user expectations and will lead pod to unexpected Pending
189
- state(See [ issue] ( https://github.com/kubernetes/kubernetes/issues/106127 ) ).
186
+ Currently when calculating pod topology spread skew, tainted nodes are treated the same as
187
+ other regular nodes. This behavior may lead to unexpected Pending pods as the skew constraint
188
+ can only be satisfied on the tainted nodes.(See [ issue] ( https://github.com/kubernetes/kubernetes/issues/106127 ) ).
190
189
191
190
Besides, given that we have already some node inclusion policies(nodeAffinity/nodeSelector)
192
- plumbed into PodTopologySpread implicitly, we'd like to redefine all of them into
193
- a new struct explicitly this time .
191
+ plumbed into PodTopologySpread implicitly, we'd like to use this chance
192
+ to use a new API to represent the semantics explicitly .
194
193
195
194
### Goals
196
195
@@ -285,12 +284,14 @@ There are two policies now regarding to nodeAffinity and nodeTaint:
285
284
``` golang
286
285
type NodeInclusionPolicies struct {
287
286
// NodeAffinity policy indicates how we will treat nodeAffinity/nodeSelector
288
- // when calculating pod topology spread skew. The value could be Respect/Ignore.
289
- // By default, the policy is Respect.
287
+ // when calculating pod topology spread skew. The semantics vary by PolicyName:
288
+ // - Respect (default): nodes matching nodeAffinity/nodeSelector will be included.
289
+ // - Ignore: all nodes will be included.
290
290
NodeAffinity PolicyName
291
291
// NodeTaint policy indicates how we will treat node taints
292
- // when calculating pod topology spread skew. The value could be Respect/Ignore.
293
- // By default, the policy is Ignore for backwards compatibility.
292
+ // when calculating pod topology spread skew. The semantics vary by PolicyName:
293
+ // - Respect: tainted nodes that tolerate the incoming pod, along with regular nodes, will be included.
294
+ // - Ignore (default): all nodes will be included.
294
295
NodeTaint PolicyName
295
296
}
296
297
```
@@ -400,7 +401,7 @@ in back-to-back releases.
400
401
-->
401
402
#### Alpha
402
403
- Feature implemented behind feature gate.
403
- - Unit and integration tests passed.
404
+ - Unit and integration tests passed as designed in [ TestPlan ] ( ###TestPlan ) .
404
405
405
406
#### Beta
406
407
- Feature is enabled by default
0 commit comments