@@ -296,10 +296,22 @@ How will UX be reviewed, and by whom?
296
296
297
297
Consider including folks who also work outside the SIG or subproject.
298
298
-->
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.
303
315
304
316
305
317
## Design Details
0 commit comments