Skip to content

Commit 81ba612

Browse files
committed
helm installs: add comment about procedure, cleanup
1 parent f768989 commit 81ba612

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rust/stackable-cockpit/src/helm.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ fn upgrade_release(
371371
namespace: &str,
372372
suppress_output: bool,
373373
) -> Result<(), Error> {
374+
// In Helm 3 the behavior of the `--force` option has changed
375+
// It no longer deletes and re-installs a resource https://github.com/helm/helm/issues/7082#issuecomment-559558318
376+
// Because of that, conflict errors might appear, which fail the upgrade, even if `helm upgrade --force` is used
377+
// Therefore we uninstall the previous release (if present) and install the new one
374378
uninstall_release(release_name, namespace, suppress_output)?;
375379

376380
let result = helm_sys::install_helm_release(
@@ -383,9 +387,7 @@ fn upgrade_release(
383387
);
384388

385389
if let Some(error) = helm_sys::to_helm_error(&result) {
386-
error!(
387-
"Go wrapper function go_upgrade_or_install_helm_release encountered an error: {error}"
388-
);
390+
error!("Go wrapper function go_install_helm_release encountered an error: {error}");
389391

390392
return Err(Error::UpgradeRelease {
391393
source: InstallReleaseError::HelmWrapper { error },

0 commit comments

Comments
 (0)