Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 1 | # Copyright 2020-present Open Networking Foundation |
| 2 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 3 | |
| 4 | apiVersion: v1 |
| 5 | kind: ConfigMap |
| 6 | metadata: |
| 7 | name: {{ .Release.Name }}-datasource |
| 8 | labels: |
| 9 | grafana_datasource: "1" |
| 10 | data: |
| 11 | datasources.yaml: |- |
| 12 | apiVersion: 1 |
| 13 | |
| 14 | datasources: |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 15 | {{- if .Values.edgeServerDatasourceURL }} |
Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 16 | - name: RANCHER_MONITORING_GLOBAL |
| 17 | type: prometheus |
| 18 | access: proxy |
| 19 | basicAuth: false |
| 20 | editable: false |
| 21 | isDefault: true |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 22 | 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 }} |
| 33 | {{- if .Values.googleCloudMonitoring }} |
| 34 | - name: Google Cloud Monitoring |
| 35 | type: stackdriver |
| 36 | access: proxy |
| 37 | jsonData: |
| 38 | tokenUri: https://oauth2.googleapis.com/token |
| 39 | clientEmail: {{ .Values.googleCloudMonitoring.clientEmail }} |
| 40 | authenticationType: jwt |
| 41 | defaultProject: {{ .Values.googleCloudMonitoring.defaultProject }} |
| 42 | secureJsonData: |
| 43 | privateKey: | |
| 44 | {{ .Values.googleCloudMonitoring.key | indent 10 }} |
| 45 | {{- end }} |