You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-scheduling/3243-respect-pod-topology-spread-after-rolling-upgrades/README.md
+17-19
Original file line number
Diff line number
Diff line change
@@ -381,18 +381,17 @@ creation will be rejected by kube-apiserver.
381
381
Also kube-scheduler will ignore `matchLabelKeys` in the cluster-level default constraints configuration.
382
382
383
383
### [v1.33] design change and a safe upgrade path
384
-
Previously, only kube-scheduler handled `matchLabelKeys`.
385
-
But, we changed the design to make both kube-apiserver and kube-scheduler handle `matchLabelKeys`
386
-
for the reason described in [implement MatchLabelKeys in only either the scheduler plugin or kube-apiserver](#implement-matchlabelkeys-in-only-either-the-scheduler-plugin-or-kube-apiserver).
387
-
388
-
kube-apiserver will only merge key-value labels corresponding to `matchLabelKeys` into `labelSelector`
389
-
at pods creation, and it will not affect the existing pods.
390
-
So if there are unscheduled pods with `matchLabelKeys` which are already created when upgrading cluster,
391
-
they may not be scheduled correctly after the upgrade.
392
-
For a safe upgrade path from v1.32 to v1.33, kube-scheduler would handle not only `matchLabelKeys`
393
-
from the default constraints, but also all in-coming pods during v1.33.
394
-
We'll change kube-scheduler to only concern `matchLabelKeys` from the default constraints at v1.34 for efficiency,
395
-
assuming `matchLabelKeys` of all in-coming pods are handled by kube-apiserver.
384
+
Previously, kube-scheduler just internally handled `matchLabelKeys` before the calculation of scheduling results.
385
+
But, we changed the implementation design to the current form to make the design align with PodAffinity's `matchLabelKeys`.
386
+
(See the detailed discussion in [the alternative section](#implement-matchlabelkeys-in-only-either-the-scheduler-plugin-or-kube-apiserver))
387
+
388
+
However, this implementation change could break `matchLabelKeys` of unscheduled pods created before the upgrade
389
+
because kube-apiserver only handles `matchLabelKeys` at pods creation, that is,
390
+
it doesn't handle `matchLabelKeys` at existing unscheduled pods.
391
+
So, for a safe upgrade path from v1.32 to v1.33, kube-scheduler would handle not only `matchLabelKeys`
392
+
from the default constraints, but also all incoming pods during v1.33.
393
+
We're going to change kube-scheduler to only concern `matchLabelKeys` from the default constraints at v1.34 for efficiency,
394
+
assuming kube-apiserver handles `matchLabelKeys` of all incoming pods.
396
395
397
396
### Test Plan
398
397
@@ -591,8 +590,10 @@ enhancement:
591
590
CRI or CNI may require updating that component before the kubelet.
592
591
-->
593
592
594
-
To ensure a safe upgrade path from v1.32 to v1.33, we plan to change the design between v1.33 and v1.34.
595
-
For more details, please refer to the section [[v1.33] design change and a safe upgrade path](#v133-design-change-and-a-safe-upgrade-path).
593
+
There's no version skew issue.
594
+
595
+
We changed the implementation design between v1.33 and v1.34, but we designed the change not to involve any version skew issue
596
+
as described at [[v1.33] design change and a safe upgrade path](#v133-design-change-and-a-safe-upgrade-path).
596
597
597
598
## Production Readiness Review Questionnaire
598
599
@@ -812,10 +813,7 @@ Recall that end users cannot usually observe component logs or access metrics.
812
813
-->
813
814
814
815
- [x] Other (treat as last resort)
815
-
- Details:
816
-
This feature doesn't cause any logs, any events, any pod status updates.
817
-
But, users can know whether it's being evaluated by looking at `labelSelector` in `TopologySpreadConstraint`.
818
-
If key-value labels corresponding to `matchLabelKeys` are merged into `labelSelector` after Pods' creation, this feature is working correctly.
816
+
- Details: We can determine if this feature is being used by checking pods that have only `MatchLabelKeys` set in `TopologySpreadConstraint`.
819
817
820
818
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
821
819
@@ -1035,7 +1033,7 @@ Major milestones might include:
1035
1033
- 2022-03-17: Initial KEP
1036
1034
- 2022-06-08: KEP merged
1037
1035
- 2023-01-16: Graduate to Beta
1038
-
- 2025-01-23: Change the design
1036
+
- 2025-01-23: Change the implementation design to be aligned with PodAffinity's `matchLabelKeys`
0 commit comments