Which version of kube-score are you using?
kube-score version: 1.18.0
What did you do?
A deployment has a topology spread constraint like this:
- maxSkew: 4
minDomains: 3
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
# ...
matchLabelKeys:
- pod-template-hash
- maxSkew: 1
minDomains: 2
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
# ...
matchLabelKeys:
- pod-template-hash
What did you expect to see?
This topology spread constraint will force the deployment to spread pods across multiple nodes and zones. It is about as safe as the pod anti affinity rule, and it is more efficient, because we can have multiple pods on the same node.
What did you see instead?
kube-score fails with a warning about missing a pod anti-affinity rule. In this case, an anti-affinity rule would force every pod to be on its own node, which would be inefficient.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too