From a0d14f8ff7906ca20d3cc4ae52db9ec840d66bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0afa=C5=99=C3=ADk?= Date: Sun, 7 Aug 2022 00:01:01 +0200 Subject: [PATCH] helm: add a new line to the end of the credentials file (#15485) --- helm/minio/templates/_helper_create_user.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm/minio/templates/_helper_create_user.txt b/helm/minio/templates/_helper_create_user.txt index ae070ca47..ea2b3b675 100644 --- a/helm/minio/templates/_helper_create_user.txt +++ b/helm/minio/templates/_helper_create_user.txt @@ -94,6 +94,8 @@ connectToMinio $scheme echo {{ tpl .accessKey $global }} > $MINIO_ACCESSKEY_SECRETKEY_TMP {{- if .existingSecret }} cat /config/secrets/{{ tpl .existingSecretKey $global }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP +# Add a new line if it doesn't exist +sed -i '$a\' $MINIO_ACCESSKEY_SECRETKEY_TMP createUser {{ .policy }} {{ else }} echo {{ .secretKey }} >> $MINIO_ACCESSKEY_SECRETKEY_TMP