问题描述
我已经在Rancher集群上安装了一个kube-prometheus-stack(https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)实例,并利用自定义values.yaml添加了Grafana配置。
values.yaml的格拉法纳部分:
grafana:
enabled: true
ingress:
enabled: disabled
service:
type: ClusterIP
port: 3000
targetPort: 3000
annotations: {}
labels: {}
portName: service
sidecar:
image:
repository: kiwigrid/k8s-sidecar
tag: 1.1.0
sha: ""
imagePullPolicy: IfNotPresent
skipTlsVerify: true
enableUniqueFilenames: false
dashboards:
enabled: true
SCProvider: true
label: grafana_dashboard
folder: /tmp/dashboards
defaultFolderName: null
searchNamespace: ALL
folderAnnotation: null
provider:
name: sidecarProvider
orgid: 1
folder: ''
type: file
disableDelete: false
allowUiUpdates: true
foldersFromFilesStructure: false
datasources:
enabled: true
label: grafana_datasource
searchNamespace: ALL
在安装之前,我还已经将一个配置映射存储到Rancher中,名为grafana-datasource
,标签为:key:grafana_datasource
,值:1
。此配置映射存储在与kube-prometheus-stack应用程序相同的名称空间中。
在此grafana-datasource
配置图中,我放置了以下数据:
apiVersion: 1
datasources:
- name: Test-Prometheus
type: prometheus
url: https://prometheus.test.net/
access: proxy
isDefault: false
basicAuth: true
basicAuthUser: admin
basicAuthPassword: password
withCredentials: false
isDefault: false
version: 1
editable: true
我已验证我的数据源是否存在,并能够登录并通过Grafana GUI手动添加它。但是,该安装未获取我的grafana-datasource
configmap,而仅加载默认的Grafana数据源:
如何在安装过程中启用grafana并应用自定义数据源configmap?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)