blob: 6bd40e076133226752e79255758df51dd1fb2a37 [file] [log] [blame]
Andy Bavierab75e9e2020-08-06 12:05:30 -07001# Copyright 2020-present Open Networking Foundation
2# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
3
4apiVersion: v1
5kind: ConfigMap
6metadata:
7 name: {{ .Release.Name }}-datasource
8 labels:
9 grafana_datasource: "1"
10data:
Andy Bavier166404d2020-11-20 14:20:10 -070011 datasources-{{ .Release.Name }}.yaml: |-
Andy Bavierab75e9e2020-08-06 12:05:30 -070012 apiVersion: 1
13
14 datasources:
Andy Bavier5c91c1c2020-09-01 11:47:38 -070015{{- if .Values.edgeServerDatasourceURL }}
Andy Bavierab75e9e2020-08-06 12:05:30 -070016 - name: RANCHER_MONITORING_GLOBAL
17 type: prometheus
18 access: proxy
19 basicAuth: false
20 editable: false
Andy Bavier696dfeb2020-11-11 14:48:12 -070021 isDefault: false
Andy Bavier5c91c1c2020-09-01 11:47:38 -070022 url: {{ .Values.edgeServerDatasourceURL }}
23{{- end }}
24{{- range .Values.clusterDatasources }}
25 - name: {{ .cluster }}
26 type: prometheus
27 access: proxy
28 basicAuth: false
29 editable: false
30 isDefault: false
31 url: {{ .prometheusURL }}
32{{- end }}
Andy Baviera50ec202020-10-08 11:29:58 -070033{{- if .Values.sdCoreDatasourceURL }}
34 - name: RANCHER_MONITORING_SDCORE
35 type: prometheus
36 access: proxy
37 basicAuth: false
38 editable: false
39 isDefault: false
40 url: {{ .Values.sdCoreDatasourceURL }}
41{{- end }}
Andy Bavier5c91c1c2020-09-01 11:47:38 -070042{{- if .Values.googleCloudMonitoring }}
43 - name: Google Cloud Monitoring
44 type: stackdriver
45 access: proxy
46 jsonData:
47 tokenUri: https://oauth2.googleapis.com/token
48 clientEmail: {{ .Values.googleCloudMonitoring.clientEmail }}
49 authenticationType: jwt
50 defaultProject: {{ .Values.googleCloudMonitoring.defaultProject }}
51 secureJsonData:
52 privateKey: |
53{{ .Values.googleCloudMonitoring.key | indent 10 }}
Andy Bavier696dfeb2020-11-11 14:48:12 -070054{{- end }}