minio / operator

Simple Kubernetes Operator for MinIO clusters :computer:
https://min.io/docs/minio/kubernetes/upstream/index.html
GNU Affero General Public License v3.0
1.19k stars 450 forks source link

Helm Chart ignores tenant.configSecret.existingSecret=true #2325

Closed coffee-time-design closed 1 week ago

coffee-time-design commented 1 week ago

In a recent release, tenant seems to not accept an existing secret for the MinIO root credentials.

Expected Behavior

I provide Helm the following values file:

tenant:
  configSecret:
    existingSecret: true

Create the following file: echo -e "export MINIO_ROOT_USER=${RANDOM_USER}\nexport MINIO_ROOT_PASSWORD=${RANDOM_PASSWORD}" > config.env Create the following secret: kubectl create secret generic myminio-env-configuration --from-file=config.env=config.env -n tenant

I expect helm chart to install and these to be the new credentials of the root user.

Current Behavior

I get the following error: Error: UPGRADE FAILED: Unable to continue with update: Secret "myminio-env-configuration" in namespace "tenant" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "tenant"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "tenant"

If i make those changes (add annotations), the root user is now as per the default chart values as it changes the secret:

minio
minio123

Possible Solution

Something must have changed in a previous release that causes this to no longer work, as it was working, perhaps this change could be rolled back?

Steps to Reproduce (for bugs)

as above

Your Environment

OS Ubuntu 22.04 K3S Latest versions of Operator and Tenant using Helm.

ramondeklein commented 1 week ago

Already fixed with https://github.com/minio/operator/pull/2299 (not released yet). Will be released in the next version...

coffee-time-design commented 1 week ago

@ramondeklein many thanks and apologies for not picking up that this was already in motion.

sathieu commented 5 days ago

@ramondeklein Any ETA for new version?