diff options
author | Marco Platania <platania@research.att.com> | 2019-05-07 14:55:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-07 14:55:00 +0000 |
commit | efe1bac85828cff233167bdaaae7edd26b03e7a4 (patch) | |
tree | 5c9cca5b20ab5fe3d82ae2f25b6a56c4abae2ce1 /vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml | |
parent | 2e3e9ce49761fa60e9605a5c4ac74c1509596029 (diff) | |
parent | 5b1cd4ca88dd979c4b538c41db53031706e8d31b (diff) |
Merge "Visualization Helm charts package"
Diffstat (limited to 'vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml')
-rwxr-xr-x | vnfs/DAaaS/visualization/charts/grafana/templates/dashboards-json-configmap.yaml | 28 |
1 files changed, 28 insertions, 0 deletions
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 }} |