stable/prometheus-operator 持久 grafana 组织名称

     2023-03-22     95

关键词:

【中文标题】stable/prometheus-operator 持久 grafana 组织名称【英文标题】:stable/prometheus-operator persistent grafana organization name 【发布时间】:2020-06-05 21:54:28 【问题描述】:

我们有一个stable/prometheus-operator(图表:prometheus-operator-8.9.1,应用程序版本:036.0)在我们的 AKS 集群中运行,它附带安装了Grafanav6.5.2 (后来我通过手动更改grafana部署的image标签升级到v6.6.2).

我想知道的是,是否可以保留 Grafana 的组织名称,以便它在重新启动(集群、pod 等)后仍然存在。

我试图在Grafana's documentation 中找到如何执行此操作的参考,尤其是通过环境变量(或配置映射),但我能找到的只是匿名用户的设置:

[auth.anonymous]
enabled = true
org_role = Viewer
org_name = Company Server Stats

【问题讨论】:

github.com/grafana/grafana/issues/2908 ? 是的,这绝对是我的问题。我在那里添加了评论,看看会发生什么。 【参考方案1】:

目前这似乎不支持,这里有一个问题:https://github.com/grafana/grafana/issues/2908

【讨论】:

目前还没有开箱即用的方法来做到这一点。使用 Post 挂钩的建议不起作用,因为它是 pod 生命周期事件而不是容器,因此 API 无法接收命令。所以我接受这个作为答案。