Kubernetes object analysis with recommendations for improved reliability and security. kube-score actively prevents downtime and bugs in your Kubernetes YAML and Charts. Static code analysis for Kubernetes.
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
This adds check for PodDisruptionBudget with no policy. PDBs should specify a policy with
minAvailable
ormaxUnavailable
. This test flags PDBs that don't specify either.This is based on the assumption that the PDB is invalid without
minAvailable
ormaxUnavailable
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.