Skip to content

Commit 0283767

Browse files
committed
docs: Clarify instructions for cancelling an in-progress rollout
1 parent ab76972 commit 0283767

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

doc/user/content/installation/_index.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,22 @@ kubectl logs -l app.kubernetes.io/name=materialize-operator -n materialize
177177
```
178178

179179
### Cancelling the Upgrade
180-
To cancel an in-progress rollout and revert to the last completed rollout state, first retrieve the last rollout request ID from your Materialize CR. You can do this with the following command:
180+
181+
You may want to cancel an in-progress rollout if the upgrade has failed. This may be indicated by new pods not being healthy. Before cancelling, verify that the upgrade has not already completed by checking that the deploy generation (found via `status.activeGeneration`) is still the one from before the upgrade. Once an upgrade has already happened, you cannot revert using this method.
182+
183+
To cancel an in-progress rollout and revert to the last completed rollout state, first retrieve the last rollout request ID from your Materialize CR:
181184

182185
```shell
183186
kubectl get materialize <instance-name> -n materialize-environment -o jsonpath='{.status.lastCompletedRolloutRequest}'
184187
```
185188

186-
Next, get the previous `environmentdImageRef` from the `last-applied-configuration` annotation:
187-
```shell
188-
kubectl get materialize <instance-name> -n materialize-environment -o jsonpath='{.metadata.annotations.kubectl\.kubernetes\.io/last-applied-configuration}'
189-
```
190-
Finally, run the following command using the values obtained above:
189+
Then, set the `requestRollout` back to this value:
191190

192191
```shell
193192
kubectl patch materialize <instance-name> \
194193
-n materialize-environment \
195194
--type='merge' \
196-
-p "{\"spec\": {\"requestRollout\": \"<lastCompletedRolloutRequest-value>\", \"environmentdImageRef\": \"<previous-environmentdImageRef>\" }}"
195+
-p "{\"spec\": {\"requestRollout\": \"<lastCompletedRolloutRequest-value>\"}}"
197196
```
198197

199198

0 commit comments

Comments
 (0)