Importing dashboard using helm chart during installation

I am trying to install grafana using helm, during the installation I see the error in the init container
kc logs monitoring-gr-grafana-7f9cd58674-5jnkq -c download-dashboards mkdir: can't create directory '/var/lib/grafana/dashboards/': Permission denied

Here is my values.yaml

`sidecar:
dashboards:
enabled: true
label: grafana_dashboard
datasources:
enabled: true
label: grafana_datasource

persistence:
enabled: true
type: pvc

service:
portName: http

datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://monitoring-pr-prometheus-server.monitoring.svc.cluster.local

dashboards:
default:
mariadb:
gnetId: 7362
version: 5
datasource: Prometheus
mariadbx:
url: https://grafana.com/api/dashboards/7362/revisions/5/download

dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: default
orgId: 1
folder: “”
type: file
disableDeletion: false
editable: false
options:
path: /var/lib/grafana/dashboards/default`

Hi,

Did you follow the guidelines and sample for Grafana Helm repo ?

I suggest you take a look at it :

Hope it helps.

Good Luck

I did check the values file. still no luck.

Problem with the permission is caused by helm-charts/_pod.tpl at 9662c19aa193797d5349b88e533dfc6f210039a5 · grafana/helm-charts · GitHub

basically grafana chart has this

args: [ "-c", "mkdir -p /var/lib/grafana/dashboards/default && /bin/sh /etc/grafana/download_dashboards.sh" ]

and when the init container try to create directory there is permission issue

mkdir: can't create directory '/var/lib/grafana/dashboards/': Permission denied

Not sure what is the solution to solve this issue