Skip to content

Commit 820dcf8

Browse files
committed
add Risks and Mitigations
1 parent eea447d commit 820dcf8

File tree

1 file changed

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

1 file changed

+16
-4
lines changed

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,22 @@ How will UX be reviewed, and by whom?
296296
297297
Consider including folks who also work outside the SIG or subproject.
298298
-->
299-
In addition to using `pod-template-hash` added by the Deployment controller,
300-
users can also provide the customized key in `MatchLabelKeys` to identify
301-
which pods should be grouped. If so, the user needs to ensure that it is
302-
correct and not duplicated with other unrelated workloads.
299+
-
300+
In addition to using `pod-template-hash` added by the Deployment controller,
301+
users can also provide the customized key in `MatchLabelKeys` to identify
302+
which pods should be grouped. If so, the user needs to ensure that it is
303+
correct and not duplicated with other unrelated workloads.
304+
-
305+
`MatchLabelKeys` may be broken when the pod's label values corresponding to
306+
`MatchLabelKeys` are updated after the pod is created and unscheduled.
307+
`LabelSelector` will not be updated even if the pod's label values are updated,
308+
because kube-apiserver merges key-value labels into `LabelSelector` and persists
309+
them in the pod object when the pod is created.
310+
But, it is not general that the pod's labels are updated at that timing, and
311+
this means the pod will be scheduled without satisfying the `TopologySpreadConstraint`,
312+
not be unschedulable.
313+
In the first place, it is deprecated to define `MatchLabelKeys` with label keys
314+
whose value may change dynamically, and we should document it.
303315

304316

305317
## Design Details

0 commit comments

Comments
 (0)