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 <s.rabot@lectra.com>
This commit is contained in:
Sylvain Rabot
2019-01-02 06:41:51 -08:00
committed by Kubernetes Prow Robot
parent 6e556e592d
commit ef3ba97f56
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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/
@@ -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" -}}