Migrate PodDisruptionBudget to policy/v1
ProprietaryMove PodDisruptionBudget from policy/v1beta1, removed in Kubernetes 1.25, to policy/v1, adjusting an empty spec.selector so the budget goes on covering the same pods. Under policy/v1beta1 an empty selector ({}) selected no pods; under policy/v1 it selects every pod in the namespace, so changing only the API version would silently turn a budget that did nothing into one that blocks every eviction in its namespace. An unset selector means "no pods" in both versions, so the empty selector is dropped rather than carried over.
org. openrewrite. kubernetes. migrate. MigratePodDisruptionBudgetToV1Optional
Matching files will be modified. This is a glob expression.
mod run . --recipe= org. openrewrite. kubernetes. migrate. MigratePodDisruptionBudgetToV1Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.