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

score: add check for PodDisruptionBudget with no policy #396

Merged
merged 2 commits into from
Oct 1, 2021

Conversation

kd7lxl
Copy link
Contributor

@kd7lxl kd7lxl commented Sep 28, 2021

This adds check for PodDisruptionBudget with no policy. PDBs should specify a policy with minAvailable or maxUnavailable. This test flags PDBs that don't specify either.

This is based on the assumption that the PDB is invalid without minAvailable or maxUnavailable defined -- do you know of any cases where it's valid to not specify either? I don't. When I've tested a PDB like this in k8s (by accident 😄), the controller sets .status.expectedPods: 0 regardless of the deployment replicas field.

RELNOTE: Add check for PodDisruptionBudget with no policy

Copy link
Owner

@zegl zegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool, thanks a lot!

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 1, 2021

Build succeeded:

@bors bors bot merged commit 2c8ff8a into zegl:master Oct 1, 2021
@kd7lxl kd7lxl deleted the pdb branch November 8, 2021 18:54
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

Successfully merging this pull request may close these issues.

2 participants