From ef3ba97f56801cfb71c58ea857fad61629cd213b Mon Sep 17 00:00:00 2001 From: Sylvain Rabot Date: Wed, 2 Jan 2019 15:41:51 +0100 Subject: [PATCH] Trim global section to avoid empty line to be indented (#10204) This fix prometheus.yml output display when using `kubectl get configmap prometheus-server` Signed-off-by: Sylvain Rabot --- stable/prometheus/Chart.yaml | 2 +- stable/prometheus/templates/server-configmap.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 12fddcbbaa..aec992115a 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 8.3.0 +version: 8.3.1 appVersion: 2.6.0 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/templates/server-configmap.yaml b/stable/prometheus/templates/server-configmap.yaml index 372cb7a507..fa6e44a413 100644 --- a/stable/prometheus/templates/server-configmap.yaml +++ b/stable/prometheus/templates/server-configmap.yaml @@ -11,7 +11,7 @@ data: {{ $key }}: | {{- if eq $key "prometheus.yml" }} global: -{{ $root.Values.server.global | toYaml | indent 6 }} +{{ $root.Values.server.global | toYaml | trimSuffix "\n" | indent 6 }} {{- end }} {{ toYaml $value | default "{}" | indent 4 }} {{- if eq $key "prometheus.yml" -}}