Find autoscaling/v2beta1 and autoscaling/v2beta2 HorizontalPodAutoscalers

Proprietary

Find HorizontalPodAutoscaler resources still on an autoscaling beta API; v2beta1 was removed in Kubernetes v1.25 and v2beta2 in v1.26. Moving to autoscaling/v2 is not a version swap: each entry of spec.metrics carries a target object, so targetAverageUtilization becomes target.averageUtilization with target.type: Utilization and targetAverageValue becomes target.averageValue with target.type: AverageValue.

org.openrewrite.kubernetes.search.FindHorizontalPodAutoscalerV2beta

Optional

Matching files will be modified. This is a glob expression.

mod run . --recipe=org.openrewrite.kubernetes.search.FindHorizontalPodAutoscalerV2beta

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.