feat(helm): roll-forward upgrades for pinned releases #305
@@ -223,18 +223,18 @@ impl<T: Topology + HelmCommand> Interpret<T> for HelmChartInterpret {
|
|||||||
self.score.release_name
|
self.score.release_name
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
// Pinned-version safety net: if the score pins a *different*
|
// install_only=false is explicit upgrade mode; a pinned
|
||||||
// version than what's installed, refuse to silently
|
// version change is an intentional roll-forward (ADR-012-2).
|
||||||
// upgrade/downgrade — that's a manual decision.
|
// Apply it — helm fails loudly if convergence fails; no
|
||||||
|
// auto-rollback.
|
||||||
if let Some(expected) = self.expected_chart_field()
|
if let Some(expected) = self.expected_chart_field()
|
||||||
&& Self::normalize_chart_field(&expected)
|
&& Self::normalize_chart_field(&expected)
|
||||||
!= Self::normalize_chart_field(&installed_chart)
|
!= Self::normalize_chart_field(&installed_chart)
|
||||||
{
|
{
|
||||||
return Err(InterpretError::new(format!(
|
warn!(
|
||||||
"Helm release '{}' already installed as '{}', but score requests '{}'. \
|
"Helm release '{}' installed as '{}'; rolling forward to '{}'.",
|
||||||
Refusing to upgrade/downgrade; resolve manually.",
|
|
||||||
self.score.release_name, installed_chart, expected
|
self.score.release_name, installed_chart, expected
|
||||||
)));
|
);
|
||||||
}
|
}
|
||||||
// Otherwise (no pin, or pinned and matching) fall through to
|
// Otherwise (no pin, or pinned and matching) fall through to
|
||||||
// `helm upgrade --install`. Helm is the source of truth on
|
// `helm upgrade --install`. Helm is the source of truth on
|
||||||
|
|||||||
Reference in New Issue
Block a user