@@ -267,7 +267,7 @@ metadata:
267
267
- database
268
268
topologyKey : topology.kubernetes.io/zone
269
269
matchLabelSelectors : # ADDED
270
- - Key : pod-template-hash
270
+ - key : pod-template-hash
271
271
operator : In
272
272
` ` `
273
273
@@ -283,13 +283,13 @@ affinity:
283
283
podAffinity: # ensures the pods of this tenant land on the same node pool
284
284
requiredDuringSchedulingIgnoredDuringExecution:
285
285
- matchLabelSelectors:
286
- - Key : tenant
286
+ - key : tenant
287
287
operator: In
288
288
topologyKey: node-pool
289
289
podAntiAffinity: # ensures only Pods from this tenant lands on the same node pool
290
290
requiredDuringSchedulingIgnoredDuringExecution:
291
291
- matchLabelSelectors:
292
- - Key : tenant
292
+ - key : tenant
293
293
operator: NotIn
294
294
- labelSelector:
295
295
matchExpressions:
@@ -373,10 +373,8 @@ type PodAffinityTerm struct {
373
373
}
374
374
```
375
375
376
- The inter-Pod Affinity plugin will obtain the labels from the pod
377
- labels by the key in ` MatchLabelSelectors.Key ` .
378
-
379
- The obtained labels will be merged to ` LabelSelector ` of ` PodAffinityTerm ` depending on ` Operator ` .
376
+ When a Pod is created, kube-apiserver will obtain the labels from the pod
377
+ labels by the key in ` MatchLabelSelectors.Key ` , and merge to ` LabelSelector ` of ` PodAffinityTerm ` depending on ` Operator ` :
380
378
- If Operator is ` In ` , ` key in (value) ` is merged with LabelSelector.
381
379
- If Operator is ` NotIn ` , ` key notin (value) ` is merged with LabelSelector.
382
380
@@ -639,7 +637,7 @@ well as the [existing list] of feature gates.
639
637
640
638
- [x] Feature gate (also fill in values in ` kep.yaml ` )
641
639
- Feature gate name: ` MatchLabelSelectorsInPodAffinity `
642
- - Components depending on the feature gate: ` kube-scheduler ` , ` kube- apiserver`
640
+ - Components depending on the feature gate: ` kube-apiserver `
643
641
- [ ] Other
644
642
645
643
###### Does enabling the feature change any default behavior?
@@ -665,7 +663,7 @@ NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
665
663
-->
666
664
667
665
The feature can be disabled in Alpha and Beta versions
668
- by restarting kube-apiserver and kube-scheduler with the feature-gate off.
666
+ by restarting kube-apiserver the feature-gate off.
669
667
In terms of Stable versions, users can choose to opt-out by not setting the
670
668
` MatchLabelSelectors ` field.
671
669
0 commit comments