Skip to content

Commit 9cf3ad4

Browse files
committed
add docs for new ManuallyPromote upgrade rollout strategy
1 parent 3ab3d12 commit 9cf3ad4

File tree

2 files changed

+59
-23
lines changed

2 files changed

+59
-23
lines changed

doc/user/content/self-managed-deployments/upgrading/_index.md

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ name="upgrade-major-version-restriction" >}}
2424
{{< /note >}}
2525

2626

27-
## Upgrading
28-
29-
### Upgrade guides
27+
## Upgrade guides
3028

3129
The following upgrade guides are available as examples:
3230

@@ -39,7 +37,7 @@ name="upgrade-landing-guides-unified" %}}
3937
{{% include-from-yaml data="self_managed/upgrades"
4038
name="upgrade-landing-guides-legacy" %}}
4139

42-
### Upgrading the Helm Chart and Materialize Operator
40+
## Upgrading the Helm Chart and Materialize Operator
4341

4442
{{< important >}}
4543

@@ -48,7 +46,7 @@ Operator first.
4846

4947
{{</ important >}}
5048

51-
#### Update the Helm Chart repository
49+
### Update the Helm Chart repository
5250

5351
To update your Materialize Helm Chart repository:
5452

@@ -62,7 +60,7 @@ View the available chart versions:
6260
helm search repo materialize/materialize-operator --versions
6361
```
6462

65-
#### Upgrade your Materialize Operator
63+
### Upgrade your Materialize Operator
6664

6765
The Materialize Kubernetes Operator is deployed via Helm and can be updated
6866
through standard `helm upgrade` command:
@@ -93,7 +91,7 @@ helm upgrade -n materialize my-demo materialize/operator \
9391
--version {{< self-managed/versions/get-latest-version >}}
9492
```
9593

96-
### Upgrading Materialize Instances
94+
## Upgrading Materialize Instances
9795

9896
**After** you have upgraded your Materialize Operator, upgrade your Materialize
9997
instance(s) to the **APP Version** of the Operator. To find the version of your
@@ -121,7 +119,7 @@ periods for your application, the upgrade process involves two steps:
121119

122120
- Second, roll out the changes by specifying a new UUID for `requestRollout`.
123121

124-
#### Stage the Materialize instance version change
122+
### Stage the Materialize instance version change
125123

126124
To stage the Materialize instances version upgrade, update the
127125
`environmentdImageRef` field in the Materialize custom resource spec to the
@@ -143,7 +141,7 @@ does not roll out the changes.
143141
{{< /note >}}
144142

145143

146-
#### Applying the changes via `requestRollout`
144+
### Applying the changes via `requestRollout`
147145

148146
To apply chang Materialize instance upgrade, you must update the `requestRollout` field in the Materialize custom resource spec to a new UUID.
149147
Be sure to consult the [Rollout Configurations](#rollout-configuration) to ensure you've selected the correct rollout behavior.
@@ -155,7 +153,7 @@ kubectl patch materialize <instance-name> \
155153
-p "{\"spec\": {\"requestRollout\": \"$(uuidgen)\"}}"
156154
```
157155

158-
#### Staging and applying in a single command
156+
### Staging and applying in a single command
159157

160158
Although separating the staging and rollout of the changes into two steps can
161159
minimize unexpected downtime and avoid connection drops at critical periods, you
@@ -168,7 +166,7 @@ kubectl patch materialize <instance-name> \
168166
-p "{\"spec\": {\"environmentdImageRef\": \"docker.io/materialize/environmentd:{{< self-managed/versions/get-latest-version >}}\", \"requestRollout\": \"$(uuidgen)\"}}"
169167
```
170168

171-
##### Using YAML Definition
169+
#### Using YAML Definition
172170

173171
Alternatively, you can update your Materialize custom resource definition directly:
174172

@@ -193,9 +191,9 @@ Apply the updated definition:
193191
kubectl apply -f materialize.yaml
194192
```
195193

196-
### Rollout Configuration
194+
## Rollout Configuration
197195

198-
#### `requestRollout`
196+
### `requestRollout`
199197

200198
Specify a new `UUID` value for the `requestRollout` to roll out the changes to
201199
the Materialize instance.
@@ -227,15 +225,47 @@ kubectl patch materialize <instance-name> \
227225
-p "{\"spec\": {\"requestRollout\": \"$(uuidgen)\", \"forceRollout\": \"$(uuidgen)\"}}"
228226
```
229227

230-
#### Rollout strategies
231-
228+
### Rollout strategies
232229
The behavior of the new version rollout follows your `rolloutStrategy` setting:
233230

234-
| `rolloutStrategy` | Description |
235-
| ----------------- | -----------------------------------|
236-
| `WaitUntilReady` | *Default*. New instances are created and all dataflows are determined to be ready before cutover and terminating the old version, temporarily requiring twice the resources during the transition. |
237-
| `ImmediatelyPromoteCausingDowntime`| Tears down the prior version before creating and promoting the new version. This causes downtime equal to the duration it takes for dataflows to hydrate, but does not require additional resources. |
238-
| `inPlaceRollout`| *Deprecated*. The setting is ignored. |
231+
#### *WaitUntilReady* - ***Default***.
232+
Creates a new generation of pods and automatically cuts over to them as soon as they catch up to the old generation and become `ReadyToPromote`.
233+
234+
{{<note>}}
235+
This strategy temporarily doubles the required hardware capacity.
236+
{{</note>}}
237+
238+
#### *ImmediatelyPromoteCausingDowntime*
239+
Tears down the prior generation before creating and immediately promoting the new generation without waiting for it to hydrate.
240+
This causes downtime equal to the duration it takes for dataflows to hydrate, but does not require additional resources.
241+
242+
#### *ManuallyPromote* - ***Public Preview***
243+
Creates a new generation of pods, cuts over to them, only when the user
244+
manually promotes the new generation by updating the `forcePromote` field to
245+
match the `requestRollout` field. This allows the user to stage an upgrade and
246+
cut over to it at a precise time.
247+
248+
In order to minimize downtime, it is recommended to wait until all dataflows are
249+
caught up. This can be determined by checking for the `ReadyToPromote` reason in
250+
the `UpToDate` status condition in the Materialize Kubernetes custom resource.
251+
252+
{{<note>}}
253+
This strategy temporarily doubles the required hardware capacity.
254+
{{</note>}}
255+
256+
{{<warning>}}
257+
It is not recommended to leave generations unpromoted for over 6 hours.
258+
259+
Unpromoted generations keeps read holds open, preventing compaction until they
260+
are promoted or cancelled. If left unpromoted for an extended period, this data
261+
can build up and cause significant load on the metadata backend database
262+
resulting in service degradation.
263+
{{</warning>}}
264+
265+
#### *inPlaceRollout* - ***Deprecated***
266+
The setting is ignored.
267+
268+
239269

240270
## Verifying the Upgrade
241271

src/cloud-resources/src/crd/materialize.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,15 @@ pub mod v1alpha1 {
4242
/// Create a new generation of pods, leaving the old generation as the serving generation
4343
/// until the user manually promotes the new generation.
4444
///
45-
/// Users can promote the new generation at any time, even if the new generation pods are
46-
/// not fully caught up, by setting `forcePromote` to the same value as `requestRollout` in
47-
/// the Materialize spec.
45+
/// When using `ManuallyPromote`, the new generation can be promoted at any
46+
/// time, even if it has dataflows that are not fully caught up, by setting
47+
/// `forcePromote` to the same value as `requestRollout` in the Materialize spec.
48+
///
49+
/// To minimize downtime, promotion should occur when the new generation
50+
/// has caught up to the prior generation. To determine if the new
51+
/// generation has caught up, consult the `UpToDate` condition in the
52+
/// status of the Materialize Resource. If the condition's reason is
53+
/// `ReadyToPromote` the new generation is ready to promote.
4854
///
4955
/// {{<warning>}}
5056
/// Do not leave new generations unpromoted indefinitely.

0 commit comments

Comments
 (0)