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 |
Andy Bavier | 169e37d | 2020-11-03 16:01:00 -0700 | [diff] [blame] | 8 | {{- if .Values.datasourceNamespace }} |
| 9 | namespace: {{ .Values.datasourceNamespace }} |
| 10 | {{- end }} |
Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 11 | labels: |
| 12 | grafana_datasource: "1" |
| 13 | data: |
| 14 | datasources.yaml: |- |
| 15 | apiVersion: 1 |
| 16 | |
| 17 | datasources: |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 18 | {{- if .Values.edgeServerDatasourceURL }} |
Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 19 | - name: RANCHER_MONITORING_GLOBAL |
| 20 | type: prometheus |
| 21 | access: proxy |
| 22 | basicAuth: false |
| 23 | editable: false |
| 24 | isDefault: true |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 25 | 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 Bavier | a50ec20 | 2020-10-08 11:29:58 -0700 | [diff] [blame] | 36 | {{- 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 Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 45 | {{- 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 }} |