-
-
Notifications
You must be signed in to change notification settings - Fork 190
Closed
Description
Which version of kube-score are you using?
kube-score version: 1.12.0, commit: 82810c4, built: 2021-08-28T20:47:35Z
Wrote a deployment with
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- secret-app
topologyKey: topology.kubernetes.io/zone
weight: 60
Got told:
apps/v1/Deployment secret-app in secret-app 🤔
[WARNING] Deployment has host PodAntiAffinity
· Deployment does not have a host podAntiAffinity set
It's recommended to set a podAntiAffinity that stops multiple pods
from a deployment from being scheduled on the same node. This
increases availability in case the node becomes unavailable.
Though if I change the topologyKey to hostname it works..
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- secret-app
topologyKey: topology.kubernetes.io/hostname
weight: 60
Commands used to invoke kubescore
kustomize build . | kube-score score --ignore-test container-image-pull-policy --ignore-test pod-networkpolicy --ignore-tes
t deployment-has-poddisruptionbudget -
Metadata
Metadata
Assignees
Labels
No labels