Skip to content

Commit 306cf5a

Browse files
authored
Check if API is available in Helm Chart (#4070)
Checks if autoscaling/v2 is available rather than checking a specific version of kubernetes
1 parent 8ea6f2a commit 306cf5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deployments/helm-chart/templates/controller-hpa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (semverCompare ">=1.23.0" .Capabilities.KubeVersion.Version) -}}
1+
{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (.Capabilities.APIVersions.Has "autoscaling/v2") -}}
22
apiVersion: autoscaling/v2
33
kind: HorizontalPodAutoscaler
44
metadata:

0 commit comments

Comments
 (0)