helm-charts
helm-charts copied to clipboard
[loki-distributed] Invalid autoscaling api version
I got this error when I'm going to upgrade a loki-distributed release
$ helm upgrade --install loki-release -f values.yml grafana/loki-distributed
Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: [resource mapping not found for name: "loki-dist-loki-distributed-distributor" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
ensure CRDs are installed first, resource mapping not found for name: "loki-dist-loki-distributed-gateway" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
ensure CRDs are installed first, resource mapping not found for name: "loki-dist-loki-distributed-querier" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
ensure CRDs are installed first, resource mapping not found for name: "loki-dist-loki-distributed-query-frontend" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
ensure CRDs are installed first]
I've check the code for determine the autoscaling version which is this part
{{/*
Return the appropriate apiVersion for HorizontalPodAutoscaler.
*/}}
{{- define "loki.hpa.apiVersion" -}}
{{- if and (.Capabilities.APIVersions.Has "autoscaling/v2") (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) -}}
{{- print "autoscaling/v2" -}}
{{- else -}}
{{- print "autoscaling/v2beta1" -}}
{{- end -}}
{{- end -}}
but I have the autoscaling/v2 and my kubernetes version is 1.27
I'm pretty sure I should have autoscaling/v2
selected, why is it returning autoscaling/v2beta1
?