diff --git a/charts/element-web/templates/hpa.yaml b/charts/element-web/templates/hpa.yaml index 8e7c198..9b17562 100644 --- a/charts/element-web/templates/hpa.yaml +++ b/charts/element-web/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 "element-web.fullname" . }}