| # Copyright 2020-present Open Networking Foundation |
| # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| |
| apiVersion: v1 |
| kind: ConfigMap |
| metadata: |
| name: {{ .Release.Name }}-dashboards |
| labels: |
| grafana_dashboard: "1" |
| data: |
| {{- if .Values.globalDashboard }} |
| {{- if and .Values.edgeServerDatasourceURL .Values.googleCloudMonitoring }} |
| {{ (.Files.Glob "dashboards/global*.json").AsConfig | indent 2 }} |
| {{- end }} |
| {{- end }} |
| {{- if .Values.multiSiteDashboard }} |
| {{- if and .Values.edgeServerDatasourceURL .Values.clusterDatasources }} |
| {{ (.Files.Glob "dashboards/multi*.json").AsConfig | indent 2 }} |
| {{- end }} |
| {{- end }} |
| {{- if .Values.enterpriseDashboard }} |
| {{- if and .Values.edgeServerDatasourceURL .Values.clusterDatasources }} |
| {{- $path := printf "dashboards/%s*.json" .Values.enterpriseDashboard }} |
| {{ (.Files.Glob $path).AsConfig | indent 2 }} |
| {{- end }} |
| {{- end }} |
| {{- if .Values.sdCoreDashboard }} |
| {{- if .Values.sdCoreDatasourceURL }} |
| {{ (.Files.Glob "dashboards/sdcore*.json").AsConfig | indent 2 }} |
| {{- end }} |
| {{- end }} |