Skip to content

How to test dynamic status

Cesar Celis Hernandez edited this page Jun 20, 2024 · 26 revisions

Related links:

Inside cluster:

  • Install new cluster (window 1), wait here until completed:
createcluster; kustomize build ~/operator/resources > operator.yaml; k apply -f operator.yaml
  • compile and get the image (window 2), wait until u get the name of the image:
cd; cd operator; goFumpt; make
  • load image to nodes for availability in the cluster and put the image in the deployments of operator (window 3):
setOperatorImage <image>
  • monitor tenant's status (window 4):
k get tenant -n tenant-lite -w
  • install the tenant (window 5):
kustomize build github.com/minio/operator/examples/kustomization/tenant-lite > tenant.yaml; k apply -f tenant.yaml

Expected:

$ k get tenant -n tenant-lite -w
NAME      STATE   HEALTH   AGE
myminio                    0s
myminio                    44s
myminio                    44s
myminio   Waiting for MinIO TLS Certificate            44s
myminio   Waiting for MinIO TLS Certificate            54s
myminio   Provisioning MinIO Cluster IP Service            54s
myminio   Provisioning Console Service                     54s
myminio   Provisioning MinIO Headless Service              54s
myminio   Provisioning MinIO Headless Service              55s
myminio   Provisioning MinIO Headless Service              55s
myminio   Provisioning MinIO Statefulset                   55s
myminio   Provisioning MinIO Statefulset                   55s
myminio   Provisioning MinIO Statefulset                   56s
myminio   Provisionando usuario inicial                    56s

Outside Cluster:

  • Install new cluster (window 1), wait here until completed:
createcluster; kustomize build ~/operator/resources > operator.yaml; k apply -f operator.yaml
  • expose k8s api to local machine, window 2:
k proxy
  • use this configuration for intellij
# 1. Close IntelliJ
# 2. Remove .idea folder
cd; cd operator; rm -rf .idea
# 3. copy the configuration
cp -r /Users/cniackz/minio/.run /Users/cniackz/operator/.run
# 4. Open IntelliJ
# 5. Define GOROOT as usual
# 6. Configuration should appear wihtout having to put all manual
  • set replicas to 0, window 3:
setReplica0
  • compile with intellij, run operator locally. This will allow you to use breakpoints.

  • then monitor the tenant creation, window 4:

k get tenant -n tenant-lite -w
  • create the tenant, window 5:
kustomize build github.com/minio/operator/examples/kustomization/tenant-lite > tenant.yaml; k apply -f tenant.yaml

Expected:

$ k get tenant -n tenant-lite -w
NAME      STATE   HEALTH   AGE
myminio                    0s
myminio                    5s
myminio                    5s
myminio   Waiting for MinIO TLS Certificate            5s
myminio   Waiting for MinIO TLS Certificate            15s
myminio   Provisioning MinIO Cluster IP Service            15s
myminio   Provisioning Console Service                     15s
myminio   Provisioning MinIO Headless Service              15s
myminio   Provisioning MinIO Headless Service              16s
myminio   Provisioning MinIO Headless Service              16s
myminio   Provisioning MinIO Statefulset                   16s
myminio   Provisioning MinIO Statefulset                   16s
myminio   Provisioning MinIO Statefulset                   17s
myminio   Provisionando usuario inicial                    17s
Clone this wiki locally