Skip to content

Commit

Permalink
Check if API is available in Helm Chart (#4070)
Browse files Browse the repository at this point in the history
Checks if autoscaling/v2 is available rather than checking a specific
version of kubernetes
  • Loading branch information
lucacome authored Jul 17, 2023
1 parent 8ea6f2a commit 306cf5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deployments/helm-chart/templates/controller-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (semverCompare ">=1.23.0" .Capabilities.KubeVersion.Version) -}}
{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (.Capabilities.APIVersions.Has "autoscaling/v2") -}}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
Expand Down

0 comments on commit 306cf5a

Please sign in to comment.