Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/cloud-resources/src/crd/materialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ pub mod v1alpha1 {
#[default]
WaitUntilReady,

/// Create a new generation of pods, leaving the old generation as the serving generation
/// until the user manually promotes the new generation.
///
/// Users can promote the new generation at any time, even if the new generation pods are
/// not fully caught up, by setting `forcePromote` to the same value as `requestRollout` in
/// the Materialize spec.
///
/// {{<warning>}}
/// Do not leave new generations unpromoted indefinitely.
///
/// The new generation keeps open read holds which prevent compaction. Once promoted or
/// cancelled, those read holds are released. If left unpromoted for an extended time, this
/// data can build up, and can cause extreme deletion load on the metadata backend database
/// when finally promoted or cancelled.
/// {{</warning>}}
ManuallyPromote,

/// {{<warning>}}
/// THIS WILL CAUSE YOUR MATERIALIZE INSTANCE TO BE UNAVAILABLE FOR SOME TIME!!!
///
Expand Down
8 changes: 8 additions & 0 deletions src/orchestratord/src/controller/materialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,14 @@ impl k8s_controller::Context for Context {
Ok(Some(action))
}
Ok(None) => {
if mz.spec.rollout_strategy == MaterializeRolloutStrategy::ManuallyPromote
&& !mz.should_force_promote()
{
trace!(
"Ready to promote, but not promoting because the instance is configured with ManuallyPromote rollout strategy."
);
return Ok(None);
}
// do this last, so that we keep traffic pointing at
// the previous environmentd until the new one is
// fully ready
Expand Down