mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-13 05:32:14 +00:00
21 lines
677 B
YAML
21 lines
677 B
YAML
{{- if and .Values.metrics.enabled .Values.metrics.dashboards.create }}
|
|
{{- include "common.values.setup" . -}}
|
|
{{- $namespace := .Values.metrics.dashboards.namespace | default $.Release.Namespace }}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "common.names.fullname" . }}
|
|
namespace: {{ $namespace }}
|
|
labels:
|
|
{{- include "common.labels" . | nindent 4 }}
|
|
{{- with .Values.metrics.dashboards.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
data:
|
|
{{- range $path, $_ := .Files.Glob "dashboards/*.json" }}
|
|
{{- $filename := trimSuffix (ext $path) (base $path) }}
|
|
{{ base $path }}: |-
|
|
{{ $.Files.Get $path | indent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|