How to Upgrade Tenant and Operator with Kustomize - cniackz/public GitHub Wiki

Objective:

To upgrade an old tenant and old operator with Kustomize

Steps:

  1. Install old operator and old tenant:
kustomize build github.com/minio/operator/resources/\?ref\=v4.5.2 > operator-4-5-2.yaml
k apply -f operator-4-5-2.yaml
kustomize build github.com/minio/operator/examples/kustomization/tenant-lite\?ref\=v4.5.2 > tenant-4-5-2.yaml
# Then modified and removed logs and prometheus.
k apply -f tenant-4-5-2.yaml
  1. Once old Operator and Old Tenant are up and running, perform the upgrade with Kustomize:
kustomize build github.com/minio/operator/resources/\?ref\=v5.0.7 > operator-5-0-7.yaml
k apply -f operator-5-0-7.yaml
  1. For the tenant, you should only change the image in Tenant Spec on your Repo/ArgoCD pathway:
Cesars-MacBook-Pro:Tenant cniackz$ diff tenant-4-5-2.yaml tenant-5-0-7.yaml
38c38
<   name: storage-lite
---
>   name: myminio
51c51
<   image: quay.io/minio/minio:RELEASE.2022-10-02T19-29-29Z
---
>   image: quay.io/minio/minio:RELEASE.2023-07-21T21-12-44Z
56c56,60
<   - name: pool-0
---
>   - containerSecurityContext:
>       runAsGroup: 1000
>       runAsNonRoot: true
>       runAsUser: 1000
>     name: pool-0

Above the changes, all you really need at this point is preserve old tenant but with new image so that repo and k8s obj are in synch, containerSecurityContext is an optional field to add, don't change the name of your tenant as PVC names relies on it, keep it.

  1. Additionally, you will see more container in the MinIO Pods, 3 to be exact: init, sidecar and minio: