Prerequisites: grafana, configmap, sidecar-container, pod-volume
Grafana dashboard provisioning loads dashboard definitions from a declared source instead of treating clicks in the database as the only copy. Devata combines two mechanisms:
- the Kubernetes sidecar converts labeled ConfigMaps into JSON files;
- Grafana’s file provider scans those files and loads them as dashboards.
The live provider is rendered by the Grafana Helm chart:
apiVersion: 1
providers:
- name: sidecarProvider
orgId: 1
type: file
disableDeletion: false
allowUiUpdates: false
updateIntervalSeconds: 30
options:
foldersFromFilesStructure: true
path: /tmp/dashboardsEach field closes part of the contract:
| Field | Effect |
|---|---|
type: file | Read dashboard definitions from the filesystem |
path | Scan the same shared directory the sidecar writes |
updateIntervalSeconds: 30 | Poll for file changes every 30 seconds |
foldersFromFilesStructure: true | Turn the Devata subdirectory into a Grafana folder |
allowUiUpdates: false | Prevent the UI database from becoming a competing source of truth |
disableDeletion: false | Remove a provisioned dashboard when its source file disappears |
The dashboard JSON contains a stable UID, devata-overview. That preserves the dashboard URL across Pod replacement and file updates. Its title is human-facing; the UID is the durable machine identity.
Making it the home dashboard
Provisioning makes the dashboard exist. A separate Grafana setting makes it the landing page:
grafana:
grafana.ini:
dashboards:
default_home_dashboard_path: /tmp/dashboards/Devata/devata-overview.jsonThis setting points to a file, not a Grafana URL or database ID. That is why the exact shared-volume path is operationally important. At startup Grafana must be able to read the same file the provider loads.
Failure boundaries
| Observation | Most likely layer to inspect |
|---|---|
| ConfigMap absent | Argo Application source, sync, or manifest |
| ConfigMap present, file absent | Sidecar selection, permissions, annotation, or logs |
| File visible only in one container | Volume and volumeMounts |
| File present, dashboard absent | Provider YAML, JSON validity, Grafana logs |
| Dashboard exists, home is wrong | default_home_dashboard_path and exact filename |
| UI edit cannot be saved | Expected: allowUiUpdates and dashboard editable are false |
Prove the provisioned state
Grafana’s HTTP API reports whether a dashboard is provisioned:
curl -sS -u "$GRAFANA_USER:$GRAFANA_PASSWORD" \
http://<grafana-address>/api/dashboards/uid/devata-overview \
| jq '{title: .dashboard.title, uid: .dashboard.uid, panels: (.dashboard.panels | length), provisioned: .meta.provisioned}'Keep the credential outside shell history and Git. The expected result is Devata Overview, UID devata-overview, 14 panels, and provisioned: true.
Official reference: Provision Grafana.