stackrox / kube-linter

KubeLinter is a static analysis tool that checks Kubernetes YAML files and Helm charts to ensure the applications represented in them adhere to best practices.
https://docs.kubelinter.io/
Apache License 2.0
2.98k stars 234 forks source link

[FEATURE_REQUEST] New check to verify that Pod Disruption Budget objects explicitly set unhealthyPodEvictionPolicy #855

Open wissamir opened 1 month ago

wissamir commented 1 month ago

Description of the problem/feature request Kubernetes 1.31 introduces a new PDB configuration field, .spec.unhealthyPodEvictionPolicy.

The default behaviour when no policy is set corresponds to the IfHealthyBudget policy.

Description of the existing behavior vs. expected behavior IfHealthyBudget can have negative implications when draining nodes. Users who do not have specific policy requirements and leave the .spec.unhealthyPodEvictionPolicy new field implicit, are encouraged to explicitly set it to AlwaysAllow.

Additional context I'll be creating a PR to implement the new check

wissamir commented 1 month ago

PTAL PR https://github.com/stackrox/kube-linter/pull/856