Find PodDisruptionBudget resources selecting every pod
ProprietaryFind policy/v1 PodDisruptionBudget resources whose spec.selector is empty ({}), which selects every pod in the namespace and so can block all evictions in it — stalling node drains and cluster upgrades. This is occasionally deliberate, but it is also what a naive version bump from policy/v1beta1 produces, because there the same empty selector selected no pods at all.
org. openrewrite. kubernetes. search. FindPodDisruptionBudgetsSelectingAllPodsOptional
Matching files will be modified. This is a glob expression.
mod run . --recipe= org. openrewrite. kubernetes. search. FindPodDisruptionBudgetsSelectingAllPodsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.