blob: eb2a967e67d80ffa8ba666121aec224448577e32 [file] [log] [blame]
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.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 }}