【问题标题】:Cache Grafana plugin locally在本地缓存 Grafana 插件
【发布时间】:2021-08-15 02:14:09
【问题描述】:

我们有严格的出口规则,不允许 Grafana 从中提取插件的域。 想知道当 Grafana pod 在 k8s 中出现时是否有人缓存或注入了插件。

【问题讨论】:

    标签: kubernetes grafana amazon-eks


    【解决方案1】:

    GrafanaLabs 推荐的部署带有配置的volumeMounts

    ...
              volumeMounts:
                - mountPath: /var/lib/grafana
                  name: grafana-pv
    ...
    

    您可以尝试将插件文件放在那里。
    然而,这是安装插件的最糟糕的方法。更何况,当容器重启时,你将不得不重新安装所有插件。

    Recommended 安装插件的方式是在容器启动时指定 then

    docker run -d \
      -p 3000:3000 \
      --name=grafana \
      -e "GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource" \
      grafana/grafana
    

    来自other sources

    docker run -d \
      -p 3000:3000 \
      --name=grafana \
      -e "GF_INSTALL_PLUGINS=http://plugin-domain.com/my-custom-plugin.zip;custom-plugin" \
      grafana/grafana
    

    build a custom docker image with plugins pre-installed.

    考虑到您的情况,最后的解决方案可能是最好的。
    如果这不违反贵公司的政策,您可以在允许插件目录的网络中构建图像。

    【讨论】:

    • 我们已经构建了一个镜像并在构建时安装了插件,但你的回答基本上是 120% 正确的,谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-06-23
    • 1970-01-01
    • 2015-06-19
    • 1970-01-01
    • 1970-01-01
    • 2019-04-29
    • 1970-01-01
    相关资源
    最近更新 更多