fix: failure to createUser used by make-user-job helm chart (#15293)

This commit is contained in:
Jon Kartago Lamida 2022-07-16 14:22:21 +08:00 committed by GitHub
parent 0b605c3383
commit 3018b21ab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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