From e22061f2b36ece9db6aebf0580880dc3005817be Mon Sep 17 00:00:00 2001 From: bbensky Date: Thu, 15 Aug 2024 09:17:57 -0600 Subject: [PATCH] fix: hpa v2 api update Signed-off-by: bbensky fix: end conditional Signed-off-by: bbensky --- charts/aws-pca-issuer/templates/hpa.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/aws-pca-issuer/templates/hpa.yaml b/charts/aws-pca-issuer/templates/hpa.yaml index 46f54793..85dff046 100644 --- a/charts/aws-pca-issuer/templates/hpa.yaml +++ b/charts/aws-pca-issuer/templates/hpa.yaml @@ -1,9 +1,12 @@ {{- if .Values.autoscaling.enabled }} +{{- if .Capabilities.APIVersions.Has "autoscaling/v2" }} +apiVersion: autoscaling/v2 +{{- else }} apiVersion: autoscaling/v2beta1 +{{- end }} kind: HorizontalPodAutoscaler metadata: name: {{ include "aws-privateca-issuer.fullname" . }} - namespace: {{ .Release.Namespace }} labels: {{- include "aws-privateca-issuer.labels" . | nindent 4 }} spec: