cybozu-go / moco

MySQL operator on Kubernetes using GTID-based semi-synchronous replication.
https://cybozu-go.github.io/moco/
Apache License 2.0
269 stars 22 forks source link

Add caution for updating chart to v0.11.x #685

Closed masa213f closed 3 months ago

masa213f commented 3 months ago

part of https://github.com/cybozu-go/moco/issues/682

This PR adds a caution for updating the chart. When user updates MOCO Chart from chart v0.10.x or lower with --set crds.enabled=false, CRDs will be removed.

  1. Install chart v0.10.2

    $ git checkout chart-v0.10.2
    $ helm install --create-namespace --namespace moco-system moco charts/moco/
    NAME: moco
    LAST DEPLOYED: Tue Jun  4 16:39:42 2024
    NAMESPACE: moco-system
    STATUS: deployed
    REVISION: 1
    TEST SUITE: None
    $ kubectl get crd
    NAME                                  CREATED AT
    backuppolicies.moco.cybozu.com        2024-06-04T07:39:43Z
    certificaterequests.cert-manager.io   2024-06-04T07:37:31Z
    certificates.cert-manager.io          2024-06-04T07:37:31Z
    challenges.acme.cert-manager.io       2024-06-04T07:37:32Z
    clusterissuers.cert-manager.io        2024-06-04T07:37:32Z
    issuers.cert-manager.io               2024-06-04T07:37:32Z
    mysqlclusters.moco.cybozu.com         2024-06-04T07:39:43Z
    orders.acme.cert-manager.io           2024-06-04T07:37:32Z
  2. Update to the latest chart with --set crds.enabled=false

    
    $ git checkout main
    $ helm upgrade --namespace moco-system moco charts/moco/ --set crds.enabled=false
    Release "moco" has been upgraded. Happy Helming!
    NAME: moco
    LAST DEPLOYED: Tue Jun  4 16:41:41 2024
    NAMESPACE: moco-system
    STATUS: deployed
    REVISION: 2
    TEST SUITE: None

BackupPolicy and MySQLCluster are removed.

$ kubectl get crd NAME CREATED AT certificaterequests.cert-manager.io 2024-06-04T07:37:31Z certificates.cert-manager.io 2024-06-04T07:37:31Z challenges.acme.cert-manager.io 2024-06-04T07:37:32Z clusterissuers.cert-manager.io 2024-06-04T07:37:32Z issuers.cert-manager.io 2024-06-04T07:37:32Z orders.acme.cert-manager.io 2024-06-04T07:37:32Z