Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[prometheus-operator] grafana configmap for dashboards needs global scope in range function #23014

Closed
mmerrill3 opened this issue Jun 30, 2020 · 0 comments · Fixed by #23022
Closed

Comments

@mmerrill3
Copy link

Describe the bug
Within the template grafana/configmap-dashboards.yaml there is a range function. The call to the template function

namespace: {{ template "prometheus-operator.namespace" . }}

needs to be passed the global scope like this:

namespace: {{ template "prometheus-operator.namespace" $ }}

Otherwise, helm cannot evaluate the scope and will not be able to render the chart.

Version of Helm and Kubernetes:
helm 2.16.8
kubernetes 1.18.4

Which chart:
prometheus-operator

What happened:
Scope does not have the namespaceOverride value, so an error is thrown:

Error: UPGRADE FAILED: render error in "prometheus-operator/templates/grafana/configmap-dashboards.yaml": template: prometheus-operator/templates/_helpers.tpl:88:16: executing "prometheus-operator.namespace" at <.Values.namespaceOverride>: can't evaluate field Values in type []uint8

What you expected to happen:

No errors

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

mmerrill3 pushed a commit to mmerrill3/charts that referenced this issue Jun 30, 2020
Signed-off-by: mmerrill3 <michael.merrill@vonage.com>
mmerrill3 pushed a commit to mmerrill3/charts that referenced this issue Jun 30, 2020
Signed-off-by: mmerrill3 <michael.merrill@vonage.com>
mmerrill3 pushed a commit to mmerrill3/charts that referenced this issue Jul 21, 2020
Signed-off-by: mmerrill3 <michael.merrill@vonage.com>
mmerrill3 pushed a commit to mmerrill3/charts that referenced this issue Jul 22, 2020
Signed-off-by: mmerrill3 <michael.merrill@vonage.com>
k8s-ci-robot pushed a commit that referenced this issue Jul 22, 2020
Signed-off-by: mmerrill3 <michael.merrill@vonage.com>
li-adrienloiseau pushed a commit to li-adrienloiseau/charts that referenced this issue Jul 29, 2020
Signed-off-by: mmerrill3 <michael.merrill@vonage.com>
Signed-off-by: Adrien Loiseau <adrien.loiseau@logic-immo.com>
mmingorance-dh pushed a commit to mmingorance-dh/charts that referenced this issue Aug 28, 2020
Signed-off-by: mmerrill3 <michael.merrill@vonage.com>
Signed-off-by: Miguel Mingorance <miguel.mingorance@deliveryhero.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant