Skip to content

Commit

Permalink
Updates minio root user and password (canonical#298)
Browse files Browse the repository at this point in the history
Previously, when the minio krew plugin was used to deploy the minio
tenant, the root user credentials were randomly generated.

The Helm chart we're using have default values: minio, minio123.

We're now generating random strings for the root user and password.
Additionally, we're updating the minio env configuration secret name
to reflect the tenant name, as it was previously.
  • Loading branch information
claudiubelu authored and eaudetcobello committed Nov 26, 2024
1 parent af83951 commit 05fed97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions addons/minio/enable
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ if [ "x${CREATE_TENANT}" = "xyes" ]; then
fi

set -x
# secrets and tenant.configSecret are mutually exclusive.
$HELM upgrade --install "${TENANT}" tenant \
--repo $REPO --version "${VERSION}" \
--namespace "minio-operator" \
Expand All @@ -118,6 +119,11 @@ if [ "x${CREATE_TENANT}" = "xyes" ]; then
--set "tenant.pools[0].size=${CAPACITY}" \
--set "tenant.pools[0].servers=${SERVERS}" \
--set "tenant.pools[0].volumesPerServer=${VOLUMES}" \
--set "tenant.configuration.name=${TENANT}-env-configuration" \
--set "tenant.configSecret.name=${TENANT}-env-configuration" \
--set "tenant.configSecret.accessKey=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 20)" \
--set "tenant.configSecret.secretKey=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 40)" \
--set "secrets=" \
${HELM_OPTS}
set +x
fi
Expand Down

0 comments on commit 05fed97

Please sign in to comment.