pyroscope
pyroscope copied to clipboard
Fail to install simple pyroscope using helm chart
Describe the bug
Tried to install the simple pyroscope according to the guide
but got error: Error: template: pyroscope/charts/pyroscope/templates/deployments-statefulsets.yaml:100:70: executing "pyroscope/charts/pyroscope/templates/deployments-statefulsets.yaml" at <$values.readinessProbe>: wrong type for value; expected map[string]interface {}; got interface {}
To Reproduce
helm install pyroscope grafana/pyroscopeSteps to reproduce the behavior:
same as this issue https://github.com/grafana/helm-charts/issues/2960
Hey @eilonmonday. I am not able to reproduce this locally, on Kubernetes 1.25
$ helm repo add grafana https://grafana.github.io/helm-charts
$ helm repo update
$ kubectl create namespace pyroscope-test
$ curl -Lo values-micro-services.yaml https://raw.githubusercontent.com/grafana/pyroscope/main/operations/pyroscope/helm/pyroscope/values-micro-services.yaml
$ helm -n pyroscope-test install pyroscope grafana/pyroscope --values values-micro-services.yaml
All of those commands succeed.
It would be good if you could provide a few more details about when you see the error and also if and how you modified values-microservices.yaml
maybe helm or Go version?
~/helmtest]$ helm version
version.BuildInfo{Version:"v3.9.2", GitCommit:"1addefbfe665c350f4daf868a9adc5600cc064fd", GitTreeState:"clean", GoVersion:"go1.17.12"}
reproduce error:
~/helmtest]$ curl -Lo values-micro-services.yaml https://raw.githubusercontent.com/grafana/pyroscope/main/operations/pyroscope/helm/pyroscope/values-micro-services.yaml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2336 100 2336 0 0 7277 0 --:--:-- --:--:-- --:--:-- 7277
~/helmtest]$ helm template pyroscope grafana/pyroscope --values ./values-micro-services.yaml --dry-run --debug
install.go:178: [debug] Original chart version: ""
install.go:195: [debug] CHART PATH: /home/jtorres/.cache/helm/repository/pyroscope-1.4.0.tgz
Error: template: pyroscope/templates/deployments-statefulsets.yaml:100:70: executing "pyroscope/templates/deployments-statefulsets.yaml" at <$values.readinessProbe>: wrong type for value; expected map[string]interface {}; got interface {}
helm.go:84: [debug] template: pyroscope/templates/deployments-statefulsets.yaml:100:70: executing "pyroscope/templates/deployments-statefulsets.yaml" at <$values.readinessProbe>: wrong type for value; expected map[string]interface {}; got interface {}
Regardless of that, if you want to fix the problem, as I said in my other comment, just need a little change on the helm chart.
I reproduced it too. kubernetes version v1.25.6
steps:
$ helm repo add grafana https://grafana.github.io/helm-charts
"grafana" has been added to your repositories
$ helm repo update
$ helm -n kube-system install pyroscope grafana/pyroscope
Error: INSTALLATION FAILED: template: pyroscope/templates/deployments-statefulsets.yaml:100:70: executing "pyroscope/templates/deployments-statefulsets.yaml" at <$values.readinessProbe>: wrong type for value; expected map[string]interface {}; got interface {}
$ helm version
version.BuildInfo{Version:"v3.9.0", GitCommit:"7ceeda6c585217a19a1131663d8cd1f7d641b2a7", GitTreeState:"clean", GoVersion:"go1.17.5"}
FWIW: I had this issue, I resolved it by updating helm
In our case, we are using helm v3.8.1, which is using golang 1.16. It seems that before golang 1.18, all arguments are evaluated. Ref: https://tip.golang.org/doc/go1.18#htmltemplatepkghtmltemplate
I am also running into this. Interestingly, rendering it locally works, but ArgoCD cannot render it so this is definitely something to do with the version of helm being used.
Locally I use:
$ helm version
version.BuildInfo{Version:"v3.14.2", GitCommit:"c309b6f0ff63856811846ce18f3bdc93d2b4d54b", GitTreeState:"clean", GoVersion:"go1.21.7"}
ArgoCD, however, uses:
$ helm version
version.BuildInfo{Version:"v3.8.1", GitCommit:"5cb9af4b1b271d11d7a97a71df3ac337dd94ad37", GitTreeState:"clean", GoVersion:"go1.17.5"}
Unfortunately, I cannot control what version of helm ArgoCD uses.... :/
I was able to workaround this issue by just manually setting:
pyroscope:
readinessProbe:
initialDelaySeconds: 5
in my values.yaml
for the chart when I install it.