diff --git a/charts/matrix-media-repo/templates/hpa.yaml b/charts/matrix-media-repo/templates/hpa.yaml index 0211744..f07019f 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 .Capabilities.APIVersions.Has "autoscaling/v2" -}} +apiVersion: autoscaling/v2 +{{- else -}} apiVersion: autoscaling/v2beta1 +{{- end }} kind: HorizontalPodAutoscaler metadata: name: {{ include "matrix-media-repo.fullname" . }}