mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-23 00:27:55 +08:00
20 lines
572 B
YAML
20 lines
572 B
YAML
{{- if .Values.global.monitoring.enabled }}
|
|
{{- $files := .Files.Glob "dashboards/*.json" }}
|
|
{{- if $files }}
|
|
apiVersion: v1
|
|
kind: ConfigMapList
|
|
items:
|
|
{{- range $path, $fileContents := $files }}
|
|
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
|
|
- apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ printf "%s" $dashboardName | lower | replace "_" "-" }}
|
|
namespace: {{ $.Release.Namespace }}
|
|
labels:
|
|
grafana_dashboard: "1"
|
|
data:
|
|
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }} |