Hi team, I need to create two folders for dashboard in grafana using values.yaml, I found a reference in google but not understanding where to use exact in values.yaml
github issue: https://github.com/helm/charts/issues/10183
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: ‘A’
orgId: 1
folder: ‘A’
type: file
disableDeletion: false
editable: true
options:
path: /tmp/dashboards/a
- name: ‘B’
orgId: 1
folder: ‘B’
type: file
disableDeletion: false
editable: true
options:
path: /tmp/dashboards/b
After doing multiple pocs, I have found the way to create custom folder using values.yaml, to keep dashboards as a isolated from other datasource dashboards.
Like prometheus datasource related all dashboards in SRE folder and loki datasource related all dashboards in monitoring folder. check below screenshoot.
Grafana:
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: ‘promscale’
orgId: 1
folder: ‘monitoring’
type: file
disableDeletion: false
editable: true
options:
path: /tmp/dashboards
using above code we can able to create custom folder as in screenshoot “monitoring”
Sidecar:
dashboards:
enabled: true
label: grafana_dashboard
labelValue: "1"
## Annotations for Grafana dashboard configmaps
##
annotations: {}
multicluster:
global:
enabled: false
etcd:
enabled: false
provider:
allowUiUpdates: true
folder: SRE
Using above code it will create default folder.
note: we have changed here default folder name with SRE.