minio: expand decommission pools in argocd

expand the tenant (tenant.pools.size) in minio
1.install tenant from appofapps, pool name: pool-0

2.to expand tenant, add pool-1 into application yaml of tenant,check into git repo;
      expand pools were OK.   tenant: it worked.

3.If want to decommission pools, run the following commands.
    #create and login a minio client pod in k8s
    kubectl run minioclient -i -t --image=minio/mc --command -- /bin/sh -c 'echo hello;sleep 3600'
    kubectl exec -i -t -n default minioclient -c minioclient -- sh

    Note that the following commands need to be run in the pod of k8s.
        #minio config
          mc alias set dev4 http://minio.tenant.svc.cluster.local:80 minio minio123 --api s3v4
4. #check the pools status
          mc admin decommission status dev4
         #decommission pool (it will automatically migrate data.)
          mc admin decommission start dev4 http://myminio-pool-1-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data

5. delete pool-1 in tenant application yaml,  check into git repo;
        tenant: it worked. ( pool-0 )

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: tenant
  namespace: argocd
  finalizers:
  - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: 'https://operator.min.io/'
    targetRevision: 5.0.6
    helm:
      parameters:
        - name: 'tenant.pools[0].storageClassName'
          value: cinder
        - name: 'tenant.pools[0].name'
          value: 'pool-0'
        - name: 'tenant.pools[0].servers'
          value: '4'
        - name: 'tenant.pools[0].size'
          value: 4Gi
        - name: 'tenant.pools[0].volumesPerServer'
          value: '4'
#       - name: 'tenant.pools[1].storageClassName'
#         value: cinder
#       - name: 'tenant.pools[1].name'
#         value: 'pool-1'
#       - name: 'tenant.pools[1].servers'
#         value: '4'
#       - name: 'tenant.pools[1].size'
#         value: 6Gi
#       - name: 'tenant.pools[1].volumesPerServer'
#         value: '4'
        - name: tenant.certificate.requestAutoCert
          value: 'false'
        - name: 'tenant.buckets[0].name'
          value: 'artifacts'
        - name: 'tenant.buckets[1].name'
          value: 'test'
    chart: tenant
  destination:
    server: 'https://kubernetes.default.svc'
    namespace: tenant
  syncPolicy:
    automated: {}
    syncOptions:
      - CreateNamespace=true

你可能感兴趣的:(minio,argocd)