kube-score icon indicating copy to clipboard operation
kube-score copied to clipboard

Feature Request: Fail when PDB is set and replica is < 2

Open jkleinlercher opened this issue 3 years ago • 1 comments

In https://github.com/zegl/kube-score/blob/47b5ae268cec7e6ffb50fa5d1848fb3c15f3fc97/score/disruptionbudget/disruptionbudget.go#L41 kube-score already checks if replicas < 2 ignore the check that a PDB must be set. However, wouldn‘t it be good that if replicas < 2 a PDB must NOT be set because it will prevent node drain operations from succeeding. Any operation that needs to kill that single replica will conflict with the PodDisruptionBudget that is defined.

so I would love to see a seperate test which checks such a constellation.

Any thoughts about that?

jkleinlercher avatar Jun 22 '21 17:06 jkleinlercher

Hm, while reading https://blogs.infosupport.com/how-not-to-configure-pod-disruption-budget/ I learned the topic PDB is maybe more complicated than I thought …

jkleinlercher avatar Jun 22 '21 18:06 jkleinlercher