diff --git a/charts/matrix-media-repo/templates/hpa.yaml b/charts/matrix-media-repo/templates/hpa.yaml index 0211744..7d7c85b 100644 --- a/charts/matrix-media-repo/templates/hpa.yaml +++ b/charts/matrix-media-repo/templates/hpa.yaml @@ -1,5 +1,9 @@ {{- if .Values.autoscaling.enabled }} +{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: autoscaling/v2 +{{- else -}} apiVersion: autoscaling/v2beta1 +{{- end }} kind: HorizontalPodAutoscaler metadata: name: {{ include "matrix-media-repo.fullname" . }}