aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/grafana/configmaps-datasources.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/grafana/configmaps-datasources.yaml')
-rwxr-xr-xkud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/grafana/configmaps-datasources.yaml38
1 files changed, 38 insertions, 0 deletions
diff --git a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/grafana/configmaps-datasources.yaml b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/grafana/configmaps-datasources.yaml
new file mode 100755
index 00000000..40198b56
--- /dev/null
+++ b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/grafana/configmaps-datasources.yaml
@@ -0,0 +1,38 @@
+{{- if and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-grafana-datasource
+ namespace: {{ template "prometheus-operator.namespace" . }}
+{{- if .Values.grafana.sidecar.datasources.annotations }}
+ annotations:
+{{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }}
+{{- end }}
+ 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:
+{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }}
+ - name: Prometheus
+ type: prometheus
+ url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
+ access: proxy
+ isDefault: true
+{{- if .Values.grafana.sidecar.datasources.createPrometheusReplicasDatasources }}
+{{- range until (int .Values.prometheus.prometheusSpec.replicas) }}
+ - name: Prometheus-{{ . }}
+ type: prometheus
+ url: http://prometheus-{{ template "prometheus-operator.fullname" $ }}-prometheus-{{ . }}.prometheus-operated:9090/{{ trimPrefix "/" $.Values.prometheus.prometheusSpec.routePrefix }}
+ access: proxy
+ isDefault: false
+{{- end }}
+{{- end }}
+{{- end }}
+{{- if .Values.grafana.additionalDataSources }}
+{{ tpl (toYaml .Values.grafana.additionalDataSources | indent 4) . }}
+{{- end }}
+{{- end }}