existingSecret - cniackz/public GitHub Wiki

  1. In the helm chart, you use existingSecret:
## Secret with default environment variable configurations to be used by MinIO Tenant.
## Not recommended for production deployments! Create the secret manually instead.
secrets:
  # name: myminio-env-configuration
  # MinIO root user and password
  # accessKey: minio
  # secretKey: minio123
  ## Set the value for existingSecret to use a pre created secret and dont create default one
  existingSecret: myminio-env-configuration
## MinIO Tenant Definition
tenant:
  1. Create the cluster
createcluster nodeport
  1. install the operator
installoperator withhelm
  1. create the tenant namespace
k create namespace tenant-ns
  1. Create the configuration secret in advance
apiVersion: v1
data:
  config.env: ZXhwb3J0IE1JTklPX1JPT1RfVVNFUj0ibWluaW8iCmV4cG9ydCBNSU5JT19ST09UX1BBU1NXT1JEPSJtaW5pbzMyMSI=
kind: Secret
metadata:
  annotations:
    meta.helm.sh/release-name: tenant-ns
    meta.helm.sh/release-namespace: tenant-ns
  creationTimestamp: "2024-03-19T19:37:21Z"
  labels:
    app.kubernetes.io/managed-by: Helm
  name: myminio-env-configuration
  namespace: tenant-ns
  resourceVersion: "845"
  uid: aaf20d77-8df3-4ade-b00f-4611e0245aeb
type: Opaque


k apply -f secret.yaml
  1. install the tenant once the secret was previously created
# To install tenant via Helm:
function installtenanthelmexistingsecret() {
    helm install \
      --namespace tenant-ns \
      --create-namespace tenant-ns \
      /Users/cniackz/bash-config/config-files/helm/Tenant/helm-tenant-5.0.9-existingSecret
}

installtenanthelmexistingsecret
  1. tenant is deployed using that secret
$ mc alias set myminio https://localhost:30081 minio minio321 --insecure
Added `myminio` successfully.

Notice using new password from existingSecret which is minio321 instead of minio123, so existingSecret worked back in 5.0.9 and is expected to work for ever if no logic is changed.