fix: issue when a Helm create user job returns more than once (#15321)

This commit is contained in:
Jeff Haynie 2022-07-18 14:09:44 -05:00 committed by GitHub
parent ba9691a0ad
commit ed02ee4ef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,9 +59,9 @@ createUser() {
rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP
return 1
fi
USER=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP)
# 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