Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helm/consoleme/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ maintainers:
- email: [email protected]
name: Curtis Castrapel
type: application
version: 0.1.0
version: 0.1.1
appVersion: "1.16.0"

dependencies:
Expand Down
11 changes: 11 additions & 0 deletions helm/consoleme/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,14 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Return the appropriate apiVersion for HPA APIs.
*/}}
{{- define "apiVersionHPA" -}}
{{- if semverCompare "< 1.23-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "autoscaling/v2beta2" }}
{{- else if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "autoscaling/v2" }}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion helm/consoleme/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
apiVersion: {{ template "apiVersionHPA" . }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "consoleme.fullname" . }}
Expand Down