pingcap / tidb-operator

TiDB operator creates and manages TiDB clusters running in Kubernetes.
https://docs.pingcap.com/tidb-in-kubernetes/
Apache License 2.0
1.22k stars 493 forks source link

Upgrade from tidb-operator v1.0.x to v1.1.x #1891

Closed DanielZhangQD closed 4 years ago

DanielZhangQD commented 4 years ago

Feature Request

Is your feature request related to a problem? Please describe:

Before v1.1 GA, we have to make sure that all the tools and tidb-clusters deployed with tidb-operator v1.0.x can work normally and not rolling updated after upgrading to tidb-operator v1.1.x. Also have to update doc. Describe the feature you'd like:

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

DanielZhangQD commented 4 years ago

Test upgrade from tidb-operator v1.0.x to v1.1.x with below procedure:

  1. Install TiDB cluster with tidb-operator v1.0.6 helm install pingcap/tidb-cluster --name=dan10 --namespace=dan10 --version=v1.0.6 -f values-dan10-1.0.6.yaml
  2. Record down the info of Service, Deployment, Statefulset, Configmap, PVC, TidbCluster
  3. Upgrade TiDB Operator to v1.1 helm upgrade tidb-operator /home/dev/tidb-operator/charts/tidb-operator --version=v1.1.0-beta.2 -f ./values-operator-1.1.0-beta.2.yaml
  4. Check that only discovery deployment is rolling updated.
  5. Update spec.<pd/tikv/tidb>.config, check that:
    • Statefulsets are rolling updated
    • Ports and NodePorts in services are preserved
    • TiDB Cluster works normally
    • PD and TiDB service can be accessed
  6. Create TidbMonitor CR with the same config in tidb-cluster chart, check that:
    • Monitor deployment is rolling updated
    • Ports and NodePorts in services are preserved
    • Grafana, Prometheus and reloader service can be accessed (#2049)
  7. Update spec.pump with the same config in tidb-cluster chart, check that:
    • Pump statefulset is rolling updated
    • Ports in services are preserved