Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 1 | # Copyright 2020-present Open Networking Foundation |
| 2 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 3 | |
| 4 | apiVersion: v1 |
| 5 | kind: ConfigMap |
| 6 | metadata: |
| 7 | name: {{ .Release.Name }}-dashboards |
| 8 | labels: |
| 9 | grafana_dashboard: "1" |
| 10 | data: |
Andy Bavier | 502d601 | 2020-09-30 11:46:06 -0700 | [diff] [blame] | 11 | {{- if .Values.globalDashboard }} |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 12 | {{- if and .Values.edgeServerDatasourceURL .Values.googleCloudMonitoring }} |
Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 13 | {{ (.Files.Glob "dashboards/global*.json").AsConfig | indent 2 }} |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 14 | {{- end }} |
Andy Bavier | 502d601 | 2020-09-30 11:46:06 -0700 | [diff] [blame] | 15 | {{- end }} |
| 16 | {{- if .Values.multiSiteDashboard }} |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 17 | {{- if and .Values.edgeServerDatasourceURL .Values.clusterDatasources }} |
| 18 | {{ (.Files.Glob "dashboards/multi*.json").AsConfig | indent 2 }} |
| 19 | {{- end }} |
Andy Bavier | 502d601 | 2020-09-30 11:46:06 -0700 | [diff] [blame] | 20 | {{- end }} |
| 21 | {{- if .Values.enterpriseDashboard }} |
| 22 | {{- if and .Values.edgeServerDatasourceURL .Values.clusterDatasources }} |
| 23 | {{- $path := printf "dashboards/%s*.json" .Values.enterpriseDashboard }} |
| 24 | {{ (.Files.Glob $path).AsConfig | indent 2 }} |
| 25 | {{- end }} |
| 26 | {{- end }} |
Andy Bavier | acbe6af | 2020-10-06 13:51:42 -0700 | [diff] [blame] | 27 | {{- if .Values.sdCoreDashboard }} |
| 28 | {{- if .Values.sdCoreDatasourceURL }} |
| 29 | {{ (.Files.Glob "dashboards/sdcore*.json").AsConfig | indent 2 }} |
| 30 | {{- end }} |
| 31 | {{- end }} |