From 3018b21ab86308b18b9d96afa51cd1a354143ab9 Mon Sep 17 00:00:00 2001 From: Jon Kartago Lamida Date: Sat, 16 Jul 2022 14:22:21 +0800 Subject: [PATCH] fix: failure to createUser used by make-user-job helm chart (#15293) --- helm/minio/templates/_helper_create_user.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helm/minio/templates/_helper_create_user.txt b/helm/minio/templates/_helper_create_user.txt index 7fd4cde18..df94f3a77 100644 --- a/helm/minio/templates/_helper_create_user.txt +++ b/helm/minio/templates/_helper_create_user.txt @@ -10,7 +10,7 @@ MC="/usr/bin/mc --insecure" # AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters. # Special characters for example : ',",<,>,{,} -MINIO_ACCESSKEY_SECRETKEY_TMP="/config/accessKey_and_secretKey_tmp" +MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_tmp" # connectToMinio # Use a check-sleep-check loop to wait for MinIO service to be available @@ -61,6 +61,7 @@ createUser() { fi # Create the user if it does not exist if ! checkUserExists ; then + USER=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) echo "Creating user '$USER'" cat $MINIO_ACCESSKEY_SECRETKEY_TMP | ${MC} admin user add myminio else