helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

[kube-prometheus-stack] grafana dashboards contain hardcoded "-- Grafana --" string

Open elakito opened this issue 6 months ago • 0 comments

Describe the bug a clear and concise description of what the bug is.

The following 7 dashboards resources in charts/kube-prometheus-stack/templates/grafana/dashboards-1.14 contain hardcoded string "-- Grafana --" as in "annotations":{"list":[{"builtIn":1,"datasource":"-- Grafana --"

grafana-overview.yaml
k8s-coredns.yaml
cluster-total.yaml
workload-total.yaml
namespace-by-pod.yaml
namespace-by-workload.yaml

As this prometheus chart itself provides an option to install the Grafana dashboards without installing Grafana, this value should be made configurable so that Plutono can use these dashboards.

What's your helm version?

version.BuildInfo{Version:"v3.11.3", GitCommit:"66a969e7cc08af2377d055f4e6283c33ee84be33", GitTreeState:"clean", GoVersion:"go1.20.3"}

What's your kubectl version?

v1.28.3

Which chart?

kube-prometheus-stack

What's the chart version?

56.8.2

What happened?

As those 7 dashboards have the hardcoded "-- Grafana --" string, when opening one of these dashboards in Plutono, the page will display the error:

Annotation Query Failed
Datasource named -- Grafana -- was not found

What you expected to happen?

No error should occur.

How to reproduce it?

Install Kube-prometheus-stack chart with grafana disabled but force-deploy the dashboards The deployed dashboards have the hardcoded "-- Grafana --" in those 7 dashboards.

Enter the changed values of values.yaml?

grafana.enabled=false grafana.forceDeployDashboards=true grafana.sidecar.dashboards.label=plutono_dashboard

Enter the command that you execute and failing/misfunctioning.

helm install my-release prometheus-community/kube-prometheus-stack --version 56.8.2 --values values.yaml

Anything else we need to know?

No response

elakito avatar Feb 21 '24 18:02 elakito