Skip to content

Commit 5f4ccd5

Browse files
authored
Merge pull request #45111 from choznerol/patch-1
Fix `matchLabelKeys` example yaml
2 parents 0b391dd + 3ca2b44 commit 5f4ccd5

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

content/en/docs/concepts/scheduling-eviction/assign-pod-node.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -391,21 +391,22 @@ metadata:
391391
...
392392
spec:
393393
template:
394-
affinity:
395-
podAffinity:
396-
requiredDuringSchedulingIgnoredDuringExecution:
397-
- labelSelector:
398-
matchExpressions:
399-
- key: app
400-
operator: In
401-
values:
402-
- database
403-
topologyKey: topology.kubernetes.io/zone
404-
# Only Pods from a given rollout are taken into consideration when calculating pod affinity.
405-
# If you update the Deployment, the replacement Pods follow their own affinity rules
406-
# (if there are any defined in the new Pod template)
407-
matchLabelKeys:
408-
- pod-template-hash
394+
spec:
395+
affinity:
396+
podAffinity:
397+
requiredDuringSchedulingIgnoredDuringExecution:
398+
- labelSelector:
399+
matchExpressions:
400+
- key: app
401+
operator: In
402+
values:
403+
- database
404+
topologyKey: topology.kubernetes.io/zone
405+
# Only Pods from a given rollout are taken into consideration when calculating pod affinity.
406+
# If you update the Deployment, the replacement Pods follow their own affinity rules
407+
# (if there are any defined in the new Pod template)
408+
matchLabelKeys:
409+
- pod-template-hash
409410
```
410411

411412
#### mismatchLabelKeys

0 commit comments

Comments
 (0)