@@ -125,7 +125,7 @@ checklist items _must_ be updated for the enhancement to be released.
125
125
Items marked with (R) are required * prior to targeting to a milestone / release* .
126
126
127
127
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [ kubernetes/enhancements] (not the initial KEP PR)
128
- - [ ] (R) KEP approvers have approved the KEP status as ` implementable `
128
+ - [x ] (R) KEP approvers have approved the KEP status as ` implementable `
129
129
- [x] (R) Design details are appropriately documented
130
130
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
131
131
- [ ] e2e Tests for all Beta API Operations (endpoints)
@@ -256,9 +256,10 @@ How will UX be reviewed, and by whom?
256
256
257
257
Consider including folks who also work outside the SIG or subproject.
258
258
-->
259
-
260
- - Looping all the toleration/taints to filter out unsatisfied nodes may
261
- lead to performance problem.
259
+ - Checking nodeAffinity and nodeTaints the same time may lead to performance
260
+ problem, we need to verify this by adding performance tests. If performance problem
261
+ does exists, we'd like to add a node selector parser and cache the parsed object
262
+ during PreFilter.
262
263
263
264
## Design Details
264
265
@@ -274,31 +275,31 @@ A new field named `NodeInclusionPolicies` will be introduced to `TopologySpreadC
274
275
type TopologySpreadConstraint struct {
275
276
// NodeInclusionPolicies includes several policies
276
277
// when calculating pod topology spread skew
277
- NodeInclusionPolicies nodeInclusionPolicies
278
+ NodeInclusionPolicies NodeInclusionPolicies
278
279
}
279
280
```
280
281
281
282
There are two policies now regarding to nodeAffinity and nodeTaint:
282
283
``` golang
283
- type nodeInclusionPolicies struct {
284
+ type NodeInclusionPolicies struct {
284
285
// Respect nodeAffinity/nodeSelector or not in calculating.
285
286
// By default we will respect this policy.
286
- nodeAffinityPolicy policyName
287
+ NodeAffinity PolicyName
287
288
// Respect all nodeTaints or not in calculating.
288
289
// By default we will ignore this policy to maintain current behavior.
289
- nodeTaintPolicy policyName
290
+ NodeTaint PolicyName
290
291
}
291
292
```
292
293
293
294
We will define two policyNames by default:
294
295
``` golang
295
- type policyName string
296
+ type PolicyName string
296
297
297
298
const (
298
299
// Ignore means ignore this policy in calculating.
299
- ignore policyName = " ignore"
300
+ Ignore PolicyName = " ignore"
300
301
// Respect means use this policy in calculating.
301
- respect policyName = " respect"
302
+ Respect PolicyName = " respect"
302
303
)
303
304
```
304
305
@@ -324,8 +325,7 @@ when drafting this test plan.
324
325
- Unit and integration tests:
325
326
- Defaulting and validation tests
326
327
- Feature gate enable/disable tests
327
- - ` nodeAffinityPolicy ` works as expected
328
- - ` nodeTaintPolicy ` works as expected
328
+ - ` NodeInclusionPolicies ` works as expected
329
329
- Benchmark tests:
330
330
- Verify the performance of looping all toleration and taints in calculating skew is acceptable
331
331
502
502
N/A.
503
503
504
504
###### Are there any tests for feature enablement/disablement?
505
- Yes.
505
+ Yes, unit test will switch the feature gate manually to compare the different behavior .
506
506
507
507
<!--
508
508
The e2e framework does not currently support enabling or disabling feature
@@ -528,7 +528,7 @@ feature flags will be enabled on some API servers and not others during the
528
528
rollout. Similarly, consider large clusters and how enablement/disablement
529
529
will rollout across nodes.
530
530
-->
531
- A malformed configuration will cause the scheduler failing to start. Running workloads are not affected.
531
+ A malformed configuration like non-exist policy will cause the scheduler failing to start. Running workloads are not affected.
532
532
533
533
###### What specific metrics should inform a rollback?
534
534
@@ -812,7 +812,8 @@ What other approaches did you consider, and why did you rule them out? These do
812
812
not need to be as detailed as the proposal, but should include enough
813
813
information to express the idea and why it was not acceptable.
814
814
-->
815
- N/A
815
+ - Changing the current behavior without introducing control.
816
+ - Checking specific taints.
816
817
817
818
## Infrastructure Needed (Optional)
818
819
0 commit comments