From 1e357d4080783c0872b97ca1d78e248c21ca7978 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 10 Oct 2024 20:23:00 +0200 Subject: [PATCH] checksum/config already defined This fixes: ``` Helm install failed for release prom/perses with chart perses@0.4.2: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors: line 30: mapping key "checksum/config" already defined at line 29 ``` Signed-off-by: Michael --- charts/perses/templates/statefulset.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/perses/templates/statefulset.yaml b/charts/perses/templates/statefulset.yaml index ef5c4ef..39a8335 100644 --- a/charts/perses/templates/statefulset.yaml +++ b/charts/perses/templates/statefulset.yaml @@ -20,9 +20,10 @@ spec: labels: {{- include "perses.selectorLabels" . | nindent 8 }} annotations: - checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} {{- if .Values.datasources }} checksum/config: {{ include (print $.Template.BasePath "/datasources.yaml") . | sha256sum }} + {{- else }} + checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }} {{- end }} spec: serviceAccountName: {{ include "perses.serviceAccountName" . }} @@ -98,4 +99,4 @@ spec: - name: datasources configMap: name: {{ include "perses.fullname" . }}-datasources - {{- end }} \ No newline at end of file + {{- end }}