aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/prometheus-operator/templates/grafana/configmaps-datasources.yaml
blob: 5b8b54c4ee13a625b89bc9fe442097685a7e64da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{- if and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "prometheus-operator.fullname" . }}-grafana-datasource
  labels:
    {{ $.Values.grafana.sidecar.datasources.label }}: "1"
    app: {{ template "prometheus-operator.name" $ }}-grafana
{{ include "prometheus-operator.labels" $ | indent 4 }}
data:
  datasource.yaml: |-
    apiVersion: 1
    datasources:
    - name: Prometheus
      type: prometheus
      url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:9090/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
      access: proxy
      isDefault: true
{{- end }}