seaweedfs-grafana-dashboard.yaml 512 B

12345678910111213141516171819
  1. {{- if .Values.global.monitoring.enabled }}
  2. {{- $files := .Files.Glob "dashboards/*.json" }}
  3. {{- if $files }}
  4. {{- range $path, $file := $files }}
  5. {{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
  6. ---
  7. apiVersion: v1
  8. kind: ConfigMap
  9. metadata:
  10. name: {{ printf "%s" $dashboardName | lower | replace "_" "-" }}
  11. namespace: {{ $.Release.Namespace }}
  12. labels:
  13. grafana_dashboard: "1"
  14. data:
  15. {{ $dashboardName }}.json: |-
  16. {{ toString $file | indent 4 }}
  17. {{- end }}
  18. {{- end }}
  19. {{- end }}