Hi all,
I have installed grafana helm chart, and want to pass values to it from a parent chart - i am using prometheus in this way so assume it will also be possible. My directory structure is;
/grafana
/charts/grafana-6.16.10.tgz
/dashboards/kubernetes.json
/values.yaml
/datasources.yaml
In the values.yaml have;
grafana:
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default
dashboards:
default:
kubernetes:
file: dashboards/kubernetes.json
azure:
gntId: 14986
version: 1
When running the helm upgrade, it picks up my values.yaml and creates a /var/lib/grafana/dashboards/default
directory, however the kubernetes.json it loads is empty, and I get the following error in the log;
lvl=eror msg="failed to load dashboard from " logger=provisioning.dashboard type=file name=default file=/var/lib/grafana/dashboards/default/kubernetes.json error=EOF
Looking through the go code, I can see that it will create a .json if the value is .json, which explains why the empty file is being created.
Iāve also read that it is currently not possible to pass dashboards āexternallyā to the chart, even though we are able to pass datasources.yaml āexternallyā. We generate this file using a shell script.
The other suggestion has been to use a sidecar, however in the halm chart default values, the following is written;
## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
I do not want to configure our datasources using sidecar, only the dashboards. Does this mean this option is not available to me? Iām at an impasse now, any guidance would be very much appreciated.
Thank you!
Swapna