From 5b1cd4ca88dd979c4b538c41db53031706e8d31b Mon Sep 17 00:00:00 2001 From: Srivahni Date: Tue, 2 Apr 2019 16:10:45 -0700 Subject: Visualization Helm charts package Helm charts for Grafana Added Prometheus and M3DB as datasouces Change-Id: I60bebd0c8ef26f1dc3d91659c55c43f603dd0928 Issue-ID: ONAPARC-393 Signed-off-by: Srivahni --- .../templates/dashboards-json-configmap.yaml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml (limited to 'vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml') diff --git a/vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml b/vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml new file mode 100755 index 00000000..bd46addc --- /dev/null +++ b/vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml @@ -0,0 +1,28 @@ +{{- if .Values.dashboards }} +{{ $files := .Files }} +{{- range $provider, $dashboards := .Values.dashboards }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "grafana.fullname" $ }}-dashboards-{{ $provider }} + labels: + app: {{ template "grafana.name" $ }} + chart: {{ template "grafana.chart" $ }} + release: {{ $.Release.Name }} + heritage: {{ $.Release.Service }} + dashboard-provider: {{ $provider }} +data: +{{- range $key, $value := $dashboards }} +{{- if (or (hasKey $value "json") (hasKey $value "file")) }} +{{ print $key | indent 2 }}.json: |- +{{- if hasKey $value "json" }} +{{ $value.json | indent 4 }} +{{- end }} +{{- if hasKey $value "file" }} +{{ toYaml ( $files.Get $value.file ) | indent 4}} +{{- end }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} -- cgit 1.2.3-korg