20 lines
549 B
YAML
20 lines
549 B
YAML
{{- if .Values.global.monitoring.enabled }}
|
|
{{- $files := .Files.Glob "dashboards/*.json" }}
|
|
{{- if $files }}
|
|
{{- range $path, $file := $files }}
|
|
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "seaweedfs.fullname" $ }}-{{ printf "%s" $dashboardName | lower | replace "_" "-" }}
|
|
namespace: {{ $.Release.Namespace }}
|
|
labels:
|
|
grafana_dashboard: "1"
|
|
data:
|
|
{{ $dashboardName }}.json: |-
|
|
{{ toString $file | indent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|