diff --git a/stable/prometheus-operator/Chart.yaml b/stable/prometheus-operator/Chart.yaml index b1ff65dc7c..ec6ab495a1 100644 --- a/stable/prometheus-operator/Chart.yaml +++ b/stable/prometheus-operator/Chart.yaml @@ -9,7 +9,7 @@ name: prometheus-operator sources: - https://github.com/coreos/prometheus-operator - https://coreos.com/operators/prometheus -version: 2.2.6 +version: 2.2.7 appVersion: 0.26.0 home: https://github.com/coreos/prometheus-operator keywords: diff --git a/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml b/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml index 2eab290256..0289154b9f 100644 --- a/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml +++ b/stable/prometheus-operator/templates/grafana/configmap-dashboards.yaml @@ -1,8 +1,10 @@ {{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +{{- $files := .Files.Glob "dashboards/*.json" }} +{{- if $files }} apiVersion: v1 kind: ConfigMapList items: -{{- range $path, $fileContents := .Files.Glob "dashboards/*.json" }} +{{- range $path, $fileContents := $files }} {{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} - apiVersion: v1 kind: ConfigMap @@ -17,4 +19,5 @@ items: data: {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} +{{- end }}