Skip to content

Commit f9e848a

Browse files
committed
fix4
1 parent ecd8737 commit f9e848a

File tree

1 file changed

+17
-19
lines changed
  • keps/sig-scheduling/3243-respect-pod-topology-spread-after-rolling-upgrades

1 file changed

+17
-19
lines changed

keps/sig-scheduling/3243-respect-pod-topology-spread-after-rolling-upgrades/README.md

+17-19
Original file line numberDiff line numberDiff line change
@@ -381,18 +381,17 @@ creation will be rejected by kube-apiserver.
381381
Also kube-scheduler will ignore `matchLabelKeys` in the cluster-level default constraints configuration.
382382

383383
### [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.
396395

397396
### Test Plan
398397

@@ -591,8 +590,10 @@ enhancement:
591590
CRI or CNI may require updating that component before the kubelet.
592591
-->
593592

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).
596597

597598
## Production Readiness Review Questionnaire
598599

@@ -812,10 +813,7 @@ Recall that end users cannot usually observe component logs or access metrics.
812813
-->
813814

814815
- [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`.
819817

820818
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
821819

@@ -1035,7 +1033,7 @@ Major milestones might include:
10351033
- 2022-03-17: Initial KEP
10361034
- 2022-06-08: KEP merged
10371035
- 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`
10391037

10401038
## Drawbacks
10411039

0 commit comments

Comments
 (0)