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 :
global:
# -- Overrides the Docker registry globally for all images
imageRegistry: null
# To help compatibility with other charts which use global.imagePullSecrets.
# Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style).
# Can be tempalted.
# global:
# imagePullSecrets:
# - name: pullSecret1
# - name: pullSecret2
# or
# global:
# imagePullSecrets:
# - pullSecret1
# - pullSecret2
imagePullSecrets: []
rbac:
create: true
This file has been truncated. show original
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