[stable/prometheus] Support tmpl files which are not YAML (#21208)

Signed-off-by: Malte Krupa <github-nqyroppg@nafn.de>
This commit is contained in:
Malte
2020-03-03 05:51:37 -08:00
committed by GitHub
parent e8a33892bd
commit 2f486d7629
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: prometheus
version: 11.0.0
version: 11.0.1
appVersion: 2.16.0
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
@@ -8,7 +8,11 @@ metadata:
data:
{{- $root := . -}}
{{- range $key, $value := .Values.alertmanagerFiles }}
{{- if $key | regexMatch ".*\\.ya?ml$" }}
{{ $key }}: |
{{ toYaml $value | default "{}" | indent 4 }}
{{- else }}
{{ $key }}: {{ toYaml $value | indent 4 }}
{{- end }}
{{- end -}}
{{- end -}}