mirror of https://github.com/minio/minio.git
fix: failure to createUser used by make-user-job helm chart (#15293)
This commit is contained in:
parent
0b605c3383
commit
3018b21ab8
|
@ -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.
|
# AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters.
|
||||||
# Special characters for example : ',",<,>,{,}
|
# Special characters for example : ',",<,>,{,}
|
||||||
MINIO_ACCESSKEY_SECRETKEY_TMP="/config/accessKey_and_secretKey_tmp"
|
MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_tmp"
|
||||||
|
|
||||||
# connectToMinio
|
# connectToMinio
|
||||||
# Use a check-sleep-check loop to wait for MinIO service to be available
|
# Use a check-sleep-check loop to wait for MinIO service to be available
|
||||||
|
@ -61,6 +61,7 @@ createUser() {
|
||||||
fi
|
fi
|
||||||
# Create the user if it does not exist
|
# Create the user if it does not exist
|
||||||
if ! checkUserExists ; then
|
if ! checkUserExists ; then
|
||||||
|
USER=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP)
|
||||||
echo "Creating user '$USER'"
|
echo "Creating user '$USER'"
|
||||||
cat $MINIO_ACCESSKEY_SECRETKEY_TMP | ${MC} admin user add myminio
|
cat $MINIO_ACCESSKEY_SECRETKEY_TMP | ${MC} admin user add myminio
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue