blob: 0de48dae2eff211c8389a07fe4b3d73ebdf17c92 [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
Andy Bavier169e37d2020-11-03 16:01:00 -07008{{- if .Values.datasourceNamespace }}
9 namespace: {{ .Values.datasourceNamespace }}
10{{- end }}
Andy Bavierab75e9e2020-08-06 12:05:30 -070011 labels:
12 grafana_datasource: "1"
13data:
14 datasources.yaml: |-
15 apiVersion: 1
16
17 datasources:
Andy Bavier5c91c1c2020-09-01 11:47:38 -070018{{- if .Values.edgeServerDatasourceURL }}
Andy Bavierab75e9e2020-08-06 12:05:30 -070019 - name: RANCHER_MONITORING_GLOBAL
20 type: prometheus
21 access: proxy
22 basicAuth: false
23 editable: false
24 isDefault: true
Andy Bavier5c91c1c2020-09-01 11:47:38 -070025 url: {{ .Values.edgeServerDatasourceURL }}
26{{- end }}
27{{- range .Values.clusterDatasources }}
28 - name: {{ .cluster }}
29 type: prometheus
30 access: proxy
31 basicAuth: false
32 editable: false
33 isDefault: false
34 url: {{ .prometheusURL }}
35{{- end }}
Andy Baviera50ec202020-10-08 11:29:58 -070036{{- if .Values.sdCoreDatasourceURL }}
37 - name: RANCHER_MONITORING_SDCORE
38 type: prometheus
39 access: proxy
40 basicAuth: false
41 editable: false
42 isDefault: false
43 url: {{ .Values.sdCoreDatasourceURL }}
44{{- end }}
Andy Bavier5c91c1c2020-09-01 11:47:38 -070045{{- if .Values.googleCloudMonitoring }}
46 - name: Google Cloud Monitoring
47 type: stackdriver
48 access: proxy
49 jsonData:
50 tokenUri: https://oauth2.googleapis.com/token
51 clientEmail: {{ .Values.googleCloudMonitoring.clientEmail }}
52 authenticationType: jwt
53 defaultProject: {{ .Values.googleCloudMonitoring.defaultProject }}
54 secureJsonData:
55 privateKey: |
56{{ .Values.googleCloudMonitoring.key | indent 10 }}
57{{- end }}