kubeblocks icon indicating copy to clipboard operation
kubeblocks copied to clipboard

feat: support pause and resume reconciliation of a cluster

Open yipeng1030 opened this issue 8 months ago • 3 comments

support cluster pause and resume

  • Fixes #6969

  • Pause Cluster, Component, and InstanSet Annotate the cluster, cascade pause Components (by annotating) and InstanceSets (reuse the Paused field), after pausing, the three controllers will only handle delete operations.

  • Pause Reconfigure and Configuration Asynchronous methods are not paused currently. (configconstraint.spec.reloadAction.*Trigger.sync = false) For synchronous reconfiguration operations, sending ops and modifying config are performed by the configuration operator rendering the configmap, and the changes to the configmap are implemented in the engine via Reconfigure_controller.go, thus the Configuration and Reconfigure controllers need to be paused. When the cluster resumes, modifying the corresponding configmap and configuration annotations will trigger a round of configuration tuning, and changes made during the pause will be applied.

  • Pause Backup The backup operation aims to record the true status of the cluster, and after restoration from the backup, the cluster should serve exactly the same as before. The Spec of a paused cluster is different from its real status, and there is basically no way to fetch that information, thus Kubeblocks do not support backing up a paused cluster.

pause a cluster: kubectl annotate cluster CLUSTER_NAME controller.kubeblocks.io/controller-paused="true" resume a cluster: kubectl annotate cluster CLUSTER_NAME controller.kubeblocks.io/controller-paused-

yipeng1030 avatar May 28 '24 03:05 yipeng1030