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 |
Andy Bavier | 169e37d | 2020-11-03 16:01:00 -0700 | [diff] [blame^] | 8 | {{- if .Values.dashboardNamespace }} |
| 9 | namespace: {{ .Values.dashboardNamespace }} |
| 10 | {{- end }} |
Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 11 | labels: |
| 12 | grafana_dashboard: "1" |
| 13 | data: |
Andy Bavier | 502d601 | 2020-09-30 11:46:06 -0700 | [diff] [blame] | 14 | {{- if .Values.globalDashboard }} |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 15 | {{- if and .Values.edgeServerDatasourceURL .Values.googleCloudMonitoring }} |
Andy Bavier | ab75e9e | 2020-08-06 12:05:30 -0700 | [diff] [blame] | 16 | {{ (.Files.Glob "dashboards/global*.json").AsConfig | indent 2 }} |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 17 | {{- end }} |
Andy Bavier | 502d601 | 2020-09-30 11:46:06 -0700 | [diff] [blame] | 18 | {{- end }} |
| 19 | {{- if .Values.multiSiteDashboard }} |
Andy Bavier | 5c91c1c | 2020-09-01 11:47:38 -0700 | [diff] [blame] | 20 | {{- if and .Values.edgeServerDatasourceURL .Values.clusterDatasources }} |
| 21 | {{ (.Files.Glob "dashboards/multi*.json").AsConfig | indent 2 }} |
| 22 | {{- end }} |
Andy Bavier | 502d601 | 2020-09-30 11:46:06 -0700 | [diff] [blame] | 23 | {{- 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 Bavier | acbe6af | 2020-10-06 13:51:42 -0700 | [diff] [blame] | 30 | {{- if .Values.sdCoreDashboard }} |
| 31 | {{- if .Values.sdCoreDatasourceURL }} |
| 32 | {{ (.Files.Glob "dashboards/sdcore*.json").AsConfig | indent 2 }} |
| 33 | {{- end }} |
| 34 | {{- end }} |