Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jkleinlercher opened this issue Jun 22, 2021 · 1 comment
Open

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

jkleinlercher opened this issue Jun 22, 2021 · 1 comment

Comments

@jkleinlercher
Copy link

In

if statefulset.Spec.Replicas != nil && *statefulset.Spec.Replicas < 2 {
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
Copy link
Author

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 …

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant