blob: cc0dfa2753558ef80312dd50070c87248e6f7df4 [file] [log] [blame]
Andy Bavierab75e9e2020-08-06 12:05:30 -07001# Copyright 2020-present Open Networking Foundation
2# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
3
4apiVersion: v1
5kind: ConfigMap
6metadata:
7 name: {{ .Release.Name }}-dashboards
Andy Bavier169e37d2020-11-03 16:01:00 -07008{{- if .Values.dashboardNamespace }}
9 namespace: {{ .Values.dashboardNamespace }}
10{{- end }}
Andy Bavierab75e9e2020-08-06 12:05:30 -070011 labels:
12 grafana_dashboard: "1"
13data:
Andy Bavier502d6012020-09-30 11:46:06 -070014{{- if .Values.globalDashboard }}
Andy Bavier5c91c1c2020-09-01 11:47:38 -070015{{- if and .Values.edgeServerDatasourceURL .Values.googleCloudMonitoring }}
Andy Bavierab75e9e2020-08-06 12:05:30 -070016{{ (.Files.Glob "dashboards/global*.json").AsConfig | indent 2 }}
Andy Bavier5c91c1c2020-09-01 11:47:38 -070017{{- end }}
Andy Bavier502d6012020-09-30 11:46:06 -070018{{- end }}
19{{- if .Values.multiSiteDashboard }}
Andy Bavier5c91c1c2020-09-01 11:47:38 -070020{{- if and .Values.edgeServerDatasourceURL .Values.clusterDatasources }}
21{{ (.Files.Glob "dashboards/multi*.json").AsConfig | indent 2 }}
22{{- end }}
Andy Bavier502d6012020-09-30 11:46:06 -070023{{- end }}
24{{- if .Values.enterpriseDashboard }}
25{{- if and .Values.edgeServerDatasourceURL .Values.clusterDatasources }}
26{{- $path := printf "dashboards/%s*.json" .Values.enterpriseDashboard }}
27{{ (.Files.Glob $path).AsConfig | indent 2 }}
28{{- end }}
29{{- end }}
Andy Bavieracbe6af2020-10-06 13:51:42 -070030{{- if .Values.sdCoreDashboard }}
31{{- if .Values.sdCoreDatasourceURL }}
32{{ (.Files.Glob "dashboards/sdcore*.json").AsConfig | indent 2 }}
33{{- end }}
34{{- end }}