bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.01k stars 9.22k forks source link

[bitnami/minio] Root Password Is No Longer Generated Automatically #29907

Open jnels124 opened 3 weeks ago

jnels124 commented 3 weeks ago

Name and Version

bitnami/minio 14.7.15

What architecture are you using?

None

What steps will reproduce the bug?

  1. Deploy the minio Chart without setting auth.rootPassword. It appears this PR causes the password to no longer be auto generated if not set. Is this intentional?

See error

Error: UPGRADE FAILED: execution error at (hedera-mirror-common/charts/minio/templates/standalone/deployment.yaml:29:40):
PASSWORDS ERROR: You must provide your current passwords when upgrading the release.
                 Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims.
                 Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases

    'auth.rootPassword' must not be empty, please add '--set auth.rootPassword=$ROOT_PASSWORD' to the command. To get the current value:

        export ROOT_PASSWORD=$(kubectl get secret --namespace "common" mirror-minio -o jsonpath="{.data.root-password}" | base64 -d)

Are you using any custom parameters or values?

No response

What is the expected behavior?

If this value is not set, password should be generated as random value

What do you see instead?

Error: UPGRADE FAILED: execution error at (hedera-mirror-common/charts/minio/templates/standalone/deployment.yaml:29:40):
PASSWORDS ERROR: You must provide your current passwords when upgrading the release.
                 Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims.
                 Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases

    'auth.rootPassword' must not be empty, please add '--set auth.rootPassword=$ROOT_PASSWORD' to the command. To get the current value:

        export ROOT_PASSWORD=$(kubectl get secret --namespace "common" mirror-minio -o jsonpath="{.data.root-password}" | base64 -d)

Additional information

No response

jotamartos commented 1 week ago

Hi @jnels124,

I just tried to reproduce the issue but couldn't do so. I just installed the latest version of the Chart and didn't get any error

$ helm install minio oci://registry-1.docker.io/bitnamicharts/minio 
Pulled: registry-1.docker.io/bitnamicharts/minio:14.8.0
Digest: sha256:ce47dacb4c3ae373bc625d6469483c2382bcc97fd66c574ea7e84de00c6329d5
NAME: minio
LAST DEPLOYED: Mon Oct 28 08:39:41 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: minio
CHART VERSION: 14.8.0
APP VERSION: 2024.10.13

** Please be patient while the chart is being deployed **

MinIO® can be accessed via port  on the following DNS name from within your cluster:

   minio.default.svc.cluster.local

To get your credentials run:

   export ROOT_USER=$(kubectl get secret --namespace default minio -o jsonpath="{.data.root-user}" | base64 -d)
   export ROOT_PASSWORD=$(kubectl get secret --namespace default minio -o jsonpath="{.data.root-password}" | base64 -d)

To connect to your MinIO® server using a client:

- Run a MinIO® Client pod and append the desired command (e.g. 'admin info'):

   kubectl run --namespace default minio-client \
     --rm --tty -i --restart='Never' \
     --env MINIO_SERVER_ROOT_USER=$ROOT_USER \
     --env MINIO_SERVER_ROOT_PASSWORD=$ROOT_PASSWORD \
     --env MINIO_SERVER_HOST=minio \
     --image docker.io/bitnami/minio-client:2024.10.8-debian-12-r0 -- admin info minio

To access the MinIO® web UI:

- Get the MinIO® URL:

   echo "MinIO® web URL: http://127.0.0.1:9001/minio"
   kubectl port-forward --namespace default svc/minio 9001:9001

WARNING: There are "resources" sections in the chart not set. Using "resourcesPreset" is not recommended for production. For production installations, please set the following values according to your workload needs:
  - resources
+info https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

$ k get pods 
NAME                     READY   STATUS    RESTARTS   AGE
minio-686669df99-j26tn   1/1     Running   0          4m22s

$ export ROOT_USER=$(kubectl get secret --namespace default minio -o jsonpath="{.data.root-user}" | base64 -d)
$ export ROOT_PASSWORD=$(kubectl get secret --namespace default minio -o jsonpath="{.data.root-password}" | base64 -d)
$ echo $ROOT_USER 
admin
$ echo $ROOT_PASSWORD 
JE41Rqvqom

As you can see, the password was autogenerated and the deployment didn't return any error.

Error: UPGRADE FAILED

I can see you are running an upgrade process, and you need to provide the password in that case.