Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[grafana] Fix HPA selector #3050

Merged
merged 10 commits into from
May 7, 2024
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 7.3.7
version: 7.3.8
appVersion: 10.4.0
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
12 changes: 5 additions & 7 deletions charts/grafana/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,11 @@ Return the appropriate apiVersion for ingress.
Return the appropriate apiVersion for Horizontal Pod Autoscaler.
*/}}
{{- define "grafana.hpa.apiVersion" -}}
{{- if $.Capabilities.APIVersions.Has "autoscaling/v2/HorizontalPodAutoscaler" }}
{{- print "autoscaling/v2" }}
{{- else if $.Capabilities.APIVersions.Has "autoscaling/v2beta2/HorizontalPodAutoscaler" }}
{{- print "autoscaling/v2beta2" }}
{{- else }}
{{- print "autoscaling/v2beta1" }}
{{- end }}
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" }}
{{- "autoscaling/v2" }}
{{- else }}
{{- "autoscaling/v2beta2" }}
{{- end }}
gritzkoo marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}

{{/*
Expand Down
Loading