Skip to content

Commit

Permalink
fix HorizontalPodAutoscaler apiVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
shcherbak authored and bokysan committed Apr 21, 2024
1 parent e3898ed commit 55f2f71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion helm/mail/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
{{- $fullName := include (print $chart ".fullname") . -}}
{{- $labels := include (print $chart ".labels") . -}}
{{- $kind := "StatefulSet" -}}
apiVersion: {{ .Values.autoscaling.apiVersion }}
{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta1
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ $fullName | quote }}
Expand Down
1 change: 0 additions & 1 deletion helm/mail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ autoscaling:
# targetMemoryUtilizationPercentage: 80
labels: {}
annotations: {}
apiVersion: "autoscaling/v2beta1"

nodeSelector: {}
tolerations: []
Expand Down

0 comments on commit 55f2f71

Please sign in to comment.