mirror of https://github.com/minio/minio.git
Allow to specify secrets separately (#12813)
This commit is contained in:
parent
0a62ae4e61
commit
27dbe30ecb
|
@ -35,15 +35,13 @@ docker_secrets_env_old() {
|
||||||
SECRET_KEY_FILE="/run/secrets/$MINIO_SECRET_KEY_FILE"
|
SECRET_KEY_FILE="/run/secrets/$MINIO_SECRET_KEY_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$ACCESS_KEY_FILE" ] && [ -f "$SECRET_KEY_FILE" ]; then
|
if [ -f "$ACCESS_KEY_FILE" ]; then
|
||||||
if [ -f "$ACCESS_KEY_FILE" ]; then
|
MINIO_ACCESS_KEY="$(cat "$ACCESS_KEY_FILE")"
|
||||||
MINIO_ACCESS_KEY="$(cat "$ACCESS_KEY_FILE")"
|
export MINIO_ACCESS_KEY
|
||||||
export MINIO_ACCESS_KEY
|
fi
|
||||||
fi
|
if [ -f "$SECRET_KEY_FILE" ]; then
|
||||||
if [ -f "$SECRET_KEY_FILE" ]; then
|
MINIO_SECRET_KEY="$(cat "$SECRET_KEY_FILE")"
|
||||||
MINIO_SECRET_KEY="$(cat "$SECRET_KEY_FILE")"
|
export MINIO_SECRET_KEY
|
||||||
export MINIO_SECRET_KEY
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,20 +52,18 @@ docker_secrets_env() {
|
||||||
ROOT_USER_FILE="/run/secrets/$MINIO_ROOT_USER_FILE"
|
ROOT_USER_FILE="/run/secrets/$MINIO_ROOT_USER_FILE"
|
||||||
fi
|
fi
|
||||||
if [ -f "$MINIO_ROOT_PASSWORD_FILE" ]; then
|
if [ -f "$MINIO_ROOT_PASSWORD_FILE" ]; then
|
||||||
SECRET_KEY_FILE="$MINIO_ROOT_PASSWORD_FILE"
|
ROOT_PASSWORD_FILE="$MINIO_ROOT_PASSWORD_FILE"
|
||||||
else
|
else
|
||||||
SECRET_KEY_FILE="/run/secrets/$MINIO_ROOT_PASSWORD_FILE"
|
ROOT_PASSWORD_FILE="/run/secrets/$MINIO_ROOT_PASSWORD_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$ROOT_USER_FILE" ] && [ -f "$SECRET_KEY_FILE" ]; then
|
if [ -f "$ROOT_USER_FILE" ]; then
|
||||||
if [ -f "$ROOT_USER_FILE" ]; then
|
MINIO_ROOT_USER="$(cat "$ROOT_USER_FILE")"
|
||||||
MINIO_ROOT_USER="$(cat "$ROOT_USER_FILE")"
|
export MINIO_ROOT_USER
|
||||||
export MINIO_ROOT_USER
|
fi
|
||||||
fi
|
if [ -f "$ROOT_PASSWORD_FILE" ]; then
|
||||||
if [ -f "$SECRET_KEY_FILE" ]; then
|
MINIO_ROOT_PASSWORD="$(cat "$ROOT_PASSWORD_FILE")"
|
||||||
MINIO_ROOT_PASSWORD="$(cat "$SECRET_KEY_FILE")"
|
export MINIO_ROOT_PASSWORD
|
||||||
export MINIO_ROOT_PASSWORD
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue