简体   繁体   English

Grafana for K8S - 配置仪表板访问权限

[英]Grafana for K8S - configure dashboard access permissions

We have configured Grafana user and admin roles using Grafana.ini which works great.我们使用Grafana.ini配置了 Grafana useradmin角色,效果很好。

Now we want to provide some permission to user to see specific dashboards , eg user X can see 5 dashboard and user Y can see 8 dashboards according to some configurations (permissions).现在我们想为用户提供一些权限来查看特定的仪表板,例如,根据一些配置(权限),用户 X 可以看到 5 个仪表板,用户 Y 可以看到 8 个仪表板。

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 .我们能够在 Grafana UI 中保留此配置,但如果 pod (K8S) 失败,则会删除详细信息,我们正在使用最新的 prom helm

My question is how should we store this data right, even if the pod is restarted?我的问题是,即使 Pod 重新启动,我们应该如何正确存储这些数据?

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

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

https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml#L253 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...任何解决方案/方向都会有所帮助,因为我相信 grafana 会以某种方式存储这些数据,但不确定在哪里......

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我发现这个链接正在谈论用户在数据库等上的存储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.不确定缺少什么,因为数据应该保存在 k8s 卷中……如果有任何其他解决方案或解决方法,请告诉我。

You need to deploy your Grafana instance with a persistent storage.您需要使用持久存储部署 Grafana 实例。 Either:任何一个:

  • Keep using the built-in sqlite db - just ensure to usePVC to store it's data.继续使用内置的 sqlite db - 只需确保使用PVC来存储它的数据。 The default path can be set using this config property可以使用此配置属性设置默认路径
  • Use external db, like SQL, and configure Grafana to talk with it.使用外部数据库,如 SQL,并配置 Grafana 与之对话。 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 Grafana 持久性也将用于持久化其他设置,以及持久化仪表板、警报等。所有设置都可以通过grafana.ini helm chart 变量进行设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM