Default HorizontalPodAutoscaler to autoscaling/v2

What does this MR do?

Defaults the HorizontalPodAutoscaler apiVersion to autoscaling/v2.

When the chart is rendered without cluster API discovery (for example helm template without --api-versions, as common in GitOps pipelines), the HPA apiVersion fell back to autoscaling/v2beta1, which was removed in Kubernetes 1.25. That also meant offline renders silently dropped behavior and used v2beta1-style metric targets. Every Kubernetes version the chart supports (1.34+) serves autoscaling/v2, so this makes it the default and drops the autoscaling/v2beta2 capability probe.

Explicit global.hpa.apiVersion and local hpa.apiVersion overrides are unchanged, and the v2beta1/v2beta2 metric-spec handling stays in place for anyone who sets them explicitly.

Also fixes the "HoritonzalPodAutoscaler" typo in the helper comment.

It also removes the now-redundant global.hpa.apiVersion: autoscaling/v2 pin from HELM_DEFAULT_SETTINGS in .gitlab-ci.yml, so the kubeconform and template check jobs exercise the new default.

Verification: helm template renders all 5 default HPAs as autoscaling/v2; --set global.hpa.apiVersion=autoscaling/v2beta2 still renders autoscaling/v2beta2. RSpec was not run locally (no suitable Ruby available); relying on CI for spec/configuration/hpa_spec.rb.

Kubernetes references:

Author checklist

For general guidance, please follow our Contributing guide.

Required

For anything in this list which will not be completed, please provide a reason in the MR discussion.

  • Merge Request Title and Description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • MR has a green pipeline.
  • Documentation created/updated. (Not needed: no documented default changes.)
  • Tests added/updated.
  • Have you validated that your change works end-to-end on a real cluster deployment?
    • Describe how you did it in a comment.
  • Equivalent MR/issue for omnibus-gitlab opened.
  • When ready for review, MR is marked as ready (not a draft) and assigned to a reviewer.

Reviewers checklist

🤖 Generated with Claude Code

Edited by Clemens Beck

Merge request reports

Loading
Loading