You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting metricRelabelings, helm will fail when installing the chart with the following error:
Error: YAML parse error on jenkins/templates/jenkins-controller-servicemonitor.yaml: error converting YAML to JSON: yaml: line 19: did not find expected ',' or ']'
Error: YAML parse error on jenkins/templates/jenkins-controller-servicemonitor.yaml: error converting YAML to JSON: yaml: line 19: did not find expected ',' or ']'
What you expected to happen?
Chart should be correctly installed without YAML validation errors.
How to reproduce it
Reproduced by locally templating jenkins/templates/jenkins-controller-servicemonitor.yaml file with my values.json values.
Anything else we need to know?
After digging into the template, I see this is where it's being set:
Describe the bug
When setting metricRelabelings, helm will fail when installing the chart with the following error:
Version of Helm and Kubernetes
Chart version
4.2.15
What happened?
values.json
as such below (example):Installed the chart.
Received:
Error: YAML parse error on jenkins/templates/jenkins-controller-servicemonitor.yaml: error converting YAML to JSON: yaml: line 19: did not find expected ',' or ']'
What you expected to happen?
Chart should be correctly installed without YAML validation errors.
How to reproduce it
Reproduced by locally templating
jenkins/templates/jenkins-controller-servicemonitor.yaml
file with myvalues.json
values.Anything else we need to know?
After digging into the template, I see this is where it's being set:
helm-charts/charts/jenkins/templates/jenkins-controller-servicemonitor.yaml
Line 30 in 2bbd9f0
Since metricRelabelings is a list of maps, I believe this should be invoking
toYaml
as such:{{- toYaml .Values.controller.prometheus.metricRelabelings | trim | nindent 6 }}
I've noticed an open PR that should resolve this in #638 if merged.
The text was updated successfully, but these errors were encountered: