blob: 6bd40e076133226752e79255758df51dd1fb2a37 [file] [log] [blame]
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-datasource
labels:
grafana_datasource: "1"
data:
datasources-{{ .Release.Name }}.yaml: |-
apiVersion: 1
datasources:
{{- if .Values.edgeServerDatasourceURL }}
- name: RANCHER_MONITORING_GLOBAL
type: prometheus
access: proxy
basicAuth: false
editable: false
isDefault: false
url: {{ .Values.edgeServerDatasourceURL }}
{{- end }}
{{- range .Values.clusterDatasources }}
- name: {{ .cluster }}
type: prometheus
access: proxy
basicAuth: false
editable: false
isDefault: false
url: {{ .prometheusURL }}
{{- end }}
{{- if .Values.sdCoreDatasourceURL }}
- name: RANCHER_MONITORING_SDCORE
type: prometheus
access: proxy
basicAuth: false
editable: false
isDefault: false
url: {{ .Values.sdCoreDatasourceURL }}
{{- end }}
{{- if .Values.googleCloudMonitoring }}
- name: Google Cloud Monitoring
type: stackdriver
access: proxy
jsonData:
tokenUri: https://oauth2.googleapis.com/token
clientEmail: {{ .Values.googleCloudMonitoring.clientEmail }}
authenticationType: jwt
defaultProject: {{ .Values.googleCloudMonitoring.defaultProject }}
secureJsonData:
privateKey: |
{{ .Values.googleCloudMonitoring.key | indent 10 }}
{{- end }}