Skip to content

Commit 3ab4581

Browse files
sbernaueradwk67NickLarsenNZ
authored
docs: Add example usage of reconciliationPaused feature (#648)
* docs: Add small example of reconciliationPaused feature * Add warning * xxx -> my * Move important up * Apply suggestions from code review Co-authored-by: Andrew Kenworthy <1712947+adwk67@users.noreply.github.com> * Update modules/concepts/pages/operations/cluster_operations.adoc Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com> * typo * Update modules/concepts/pages/operations/cluster_operations.adoc Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com> * restore old important section * new suggestion --------- Co-authored-by: Andrew Kenworthy <1712947+adwk67@users.noreply.github.com> Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com>
1 parent 42ae807 commit 3ab4581

File tree

1 file changed

+49
-3
lines changed

1 file changed

+49
-3
lines changed

modules/concepts/pages/operations/cluster_operations.adoc

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ This is useful when updating operators, debugging or testing of new settings:
99
1010
If not specified, `clusterOperation.reconciliationPaused` and `clusterOperation.stopped` default to `false`.
1111

12+
[IMPORTANT]
13+
====
14+
When `clusterOperation.reconciliationPaused` is set to `true`, operators will ignore reconciliation events (creations, updates, deletions).
15+
16+
Furthermore, if you create a stacklet where `clusterOperation.reconciliationPaused` is set to `true`, no resources will be created.
17+
====
18+
19+
[IMPORTANT]
20+
====
21+
When setting `clusterOperation.reconciliationPaused` and `clusterOperation.stopped` to true in the same step, `clusterOperation.reconciliationPaused` will take precedence.
22+
23+
This means the cluster will stop reconciling immediately and the `stopped` field is ignored.
24+
25+
To avoid this, the cluster should first be stopped and then paused.
26+
====
27+
1228
== Example
1329

1430
[source,yaml]
@@ -18,10 +34,40 @@ include::example$cluster-operations.yaml[]
1834
<1> The `clusterOperation.reconciliationPaused` flag set to `true` stops the operator from reconciling any changes to the cluster spec. The cluster status is still updated.
1935
<2> The `clusterOperation.stopped` flag set to `true` stops all pods in the cluster. This is done by setting all deployed StatefulSet replicas to 0.
2036

37+
== Example usage (updating operator without downtime)
2138

22-
IMPORTANT: When setting `clusterOperation.reconciliationPaused` and `clusterOperation.stopped` to true in the same step, `clusterOperation.reconciliationPaused` will take precedence.
23-
This means the cluster will stop reconciling immediately and the `stopped` field is ignored.
24-
To avoid this, the cluster should first be stopped and then paused.
39+
One example usage of the `reconciliationPaused` feature is to update your operator without all deployed stacklets restarting simultaneously due to the changes the new operator version will apply.
40+
41+
. Disable reconciliation for e.g. ZookeeperCluster
42+
+
43+
Execute the following command for every stacklet that should not be restarted by the operator update:
44+
+
45+
[source,shell]
46+
----
47+
$ kubectl patch zookeepercluster/simple-zk --patch '{"spec": {"clusterOperation": {"reconciliationPaused": true}}}' --type=merge
48+
----
49+
50+
. Update operator
51+
+
52+
[source,shell]
53+
----
54+
$ stackablectl operator uninstall zookeeper
55+
$ # Replace CRD with new version, e.g. kubectl replace -f https://raw.githubusercontent.com/stackabletech/zookeeper-operator/24.7.0/deploy/helm/zookeeper-operator/crds/crds.yaml
56+
$ stackablectl operator install zookeeper=24.7.0 # choose your version
57+
----
58+
59+
. No Zookeeper Pods have been restarted, they are still using the old image.
60+
61+
. Enable reconciliation again
62+
+
63+
You can do this step by step for every stacklet you have, so that they will not restart simultaneously
64+
+
65+
[source,shell]
66+
----
67+
$ kubectl patch zookeepercluster/simple-zk --patch '{"spec": {"clusterOperation": {"reconciliationPaused": false}}}' --type=merge
68+
----
69+
70+
. Zookeeper Pods will restart and pull in the new image
2571

2672
== Service restarts
2773

0 commit comments

Comments
 (0)