我正在尝试理解Helm,我想知道是否有人能够以五岁孩子可以听懂的方式向我解释或者帮我解决一些问题。
所以我运行了以下命令:
helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
然后我使用以下方法安装了kube-prometheus:
helm install coreos/kube-prometheus --name kube-prometheus -f values.yaml --namespace monitoringtest
一切都正常工作,但我正在尝试从JSON文件中添加一些自定义仪表板,我很难理解如何实现。
我遵循了这个链接的指导:https://blogcodevalue.wordpress.com/2018/09/16/automate-grafana-dashboard-import-process/
在我的values.yaml文件中,我添加了以下内容:
serverDashboardConfigmaps:
- example-dashboards
我理解如果我执行:
helm upgrade --install kube-prometheus -f values.yaml --namespace monitoringtest coreos/kube-prometheus
这将导致Grafana选取名为example-dashboards
的ConfigMap,并从custom-dashboards
文件夹加载*.json文件。
apiVersion: v1
kind: ConfigMap
metadata:
name: example-dashboards
data:
{{ (.Files.Glob "custom-dashboards/*.json").AsConfig | indent 2 }}
# Or
#
# data:
# custom-dashboard.json: |-
# {{ (.Files.Get "custom.json") | indent 4 }}
#
# The filename (and consequently the key under data) must be in the format `xxx-dashboard.json` or `xxx-datasource.json`
# for them to be picked up.
现在有两个问题:
我如何将上述configmap添加到此helm发行版中?
这个custom-dashboards
文件夹在哪里?它在我的笔记本电脑上然后发送到grafana吗?
我需要复制https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
的所有内容到我的笔记本电脑吗?
抱歉解释这一切,但我只是尝试理解这个。