aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/prometheus-operator/templates/grafana/configmaps-datasources.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/prometheus-operator/templates/grafana/configmaps-datasources.yaml')
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/grafana/configmaps-datasources.yaml19
1 files changed, 19 insertions, 0 deletions
diff --git a/vnfs/DAaaS/prometheus-operator/templates/grafana/configmaps-datasources.yaml b/vnfs/DAaaS/prometheus-operator/templates/grafana/configmaps-datasources.yaml
new file mode 100644
index 00000000..5b8b54c4
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/grafana/configmaps-datasources.yaml
@@ -0,0 +1,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 }} \ No newline at end of file