mirror of
https://github.com/minio/minio.git
synced 2025-07-14 19:31:52 -04:00
fix: issue when a Helm create user job returns more than once (#15321)
This commit is contained in:
parent
ba9691a0ad
commit
ed02ee4ef4
@ -59,9 +59,9 @@ createUser() {
|
|||||||
rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP
|
rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
USER=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP)
|
||||||
# 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…
x
Reference in New Issue
Block a user