blob: d61fa998d67b8c5ade60b1e65b7ff035cb673286 [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:
{{- range .Values.prometheusDatasources }}
- name: {{ .name }}
type: prometheus
access: proxy
basicAuth: false
editable: false
isDefault: false
url: {{ .endpoint }}
{{- end }}
{{- range .Values.elasticsearchDatasources }}
- name: {{ .name }}
url: {{ .endpoint }}
type: elasticsearch
access: proxy
database: "[fluentbit-]YYYY.MM.DD"
jsonData:
interval: Daily
timeField: "@timestamp"
esVersion: 70
logMessageField: log
logLevelField: logLevel
{{- 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 }}