UNCLASSIFIED - NO CUI

Default hpaSpec configuration fails to create HPA resources

When running with Kubernetes 1.25 we ran into an issue where HPA resources would fail to be created as part of the standing up Istio. It appears in K8s 1.25 support for autoscaling/v2beta1 was dropped.

Ingress Gateways:
      Error:   failed to update resource with server-side apply for obj HorizontalPodAutoscaler/istio-system/public-ingressgateway: no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
      Status:  ERROR
    Pilot:
      Error:   failed to update resource with server-side apply for obj HorizontalPodAutoscaler/istio-system/istiod: no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
      Status:  ERROR
  Status:      ERROR

We found similar reports here which made it seem as though if we adjusted our hpaSpec that the HPA resources would be created with the newer autoscaling/v2 apiVersion which has been available since 1.23.

I tested with these changes and it seems to work.