Fix `matchLabelKeys` example yaml syntax
It should be `spec.template.spec.affinity` instead of `spec.template.affinity`. ``` $ explain deploy.spec.template.spec.affinity GROUP: apps KIND: Deployment VERSION: v1 FIELD: affinity <Affinity> ... ``` ``` $ k explain deploy.spec.template.affinity GROUP: apps KIND: Deployment VERSION: v1 error: field "affinity" does not exist ```pull/45111/head
parent
a75dd33c21
commit
3ca2b443ac
|
@ -391,21 +391,22 @@ metadata:
|
||||||
...
|
...
|
||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
affinity:
|
spec:
|
||||||
podAffinity:
|
affinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
podAffinity:
|
||||||
- labelSelector:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
matchExpressions:
|
- labelSelector:
|
||||||
- key: app
|
matchExpressions:
|
||||||
operator: In
|
- key: app
|
||||||
values:
|
operator: In
|
||||||
- database
|
values:
|
||||||
topologyKey: topology.kubernetes.io/zone
|
- database
|
||||||
# Only Pods from a given rollout are taken into consideration when calculating pod affinity.
|
topologyKey: topology.kubernetes.io/zone
|
||||||
# If you update the Deployment, the replacement Pods follow their own affinity rules
|
# Only Pods from a given rollout are taken into consideration when calculating pod affinity.
|
||||||
# (if there are any defined in the new Pod template)
|
# If you update the Deployment, the replacement Pods follow their own affinity rules
|
||||||
matchLabelKeys:
|
# (if there are any defined in the new Pod template)
|
||||||
- pod-template-hash
|
matchLabelKeys:
|
||||||
|
- pod-template-hash
|
||||||
```
|
```
|
||||||
|
|
||||||
#### mismatchLabelKeys
|
#### mismatchLabelKeys
|
||||||
|
|
Loading…
Reference in New Issue