6
votes

We have configured Grafana user and admin roles using Grafana.ini which works great.

Now we want to provide some permission to user to see specific dashboards, e.g. user X can see 5 dashboard and user Y can see 8 dashboards according to some configurations (permissions).

We were able to keep this config in Grafana UI but if the pod (K8S) is fail the details is deleted, we are using latest prom helm .

My question is how should we store this data right, even if the pod is restarted?

https://grafana.com/docs/grafana/latest/permissions/dashboard-folder-permissions/

https://github.com/grafana/helm-charts

https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml#L253

Any solution/direction will be helpful as I believe that grafana store this data someware but not sure where ...

I found this link which is talking about the store of the users on database etc https://grafana.com/docs/grafana/latest/administration/configuration/#database

Not sure what is missing as the data should be kept in k8s volume... If there is any other solution or a way to solve it please let me know.

1

1 Answers

0
votes

You need to deploy your Grafana instance with a persistent storage. Either:

  • Keep using the built-in sqlite db - just ensure to use PVC to store it's data. The default path can be set using this config property
  • Use external db, like SQL, and configure Grafana to talk with it. See the database config section for more details.

Grafana persistency will be used to persist other settings as well, and also persist dashboards, alerts etc. All settings can be set via the grafana.ini helm chart variable