Skip to content

Commit a022c82

Browse files
authored
Use the documented .Capabilities.KubeVersion.Version in the hpa template (#3766)
The value `.Capabilities.KubeVersion.GitVersion` is documented in Helm v2 docs - https://v2.helm.sh/docs/chart_template_guide/#built-in-objects It seems to also work with Helm v3, but it is not documented in the docs - https://helm.sh/docs/chart_template_guide/builtin_objects/ We should stick to the officially documented values.
1 parent 356c904 commit a022c82

File tree

1 file changed

+2
-2
lines changed
  • helm/aws-load-balancer-controller/templates

1 file changed

+2
-2
lines changed

helm/aws-load-balancer-controller/templates/hpa.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.autoscaling.enabled }}
2-
{{- if (semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion)}}
2+
{{- if (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version)}}
33
apiVersion: autoscaling/v2
44
{{- else }}
55
apiVersion: autoscaling/v2beta2
@@ -31,4 +31,4 @@ spec:
3131
{{- if .Values.autoscaling.autoscaleBehavior }}
3232
behavior: {{ toYaml .Values.autoscaling.autoscaleBehavior | nindent 4 }}
3333
{{- end }}
34-
{{- end }}
34+
{{- end }}

0 commit comments

Comments
 (0)