From f506db4b752c5901e13abab84cb431d0cb1937f4 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Wed, 10 Apr 2019 17:08:14 +0300 Subject: [PATCH] Add --cleanup-on-fail support into --atomic: use CleanupOnFail param in rollback Signed-off-by: Timofey Kirillov --- cmd/helm/upgrade.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 2446f3eb5..f07a5c4a7 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -283,17 +283,18 @@ func (u *upgradeCmd) run() error { if u.atomic { fmt.Fprint(u.out, "ROLLING BACK") rollback := &rollbackCmd{ - out: u.out, - client: u.client, - name: u.release, - dryRun: u.dryRun, - recreate: u.recreate, - force: u.force, - timeout: u.timeout, - wait: u.wait, - description: "", - revision: releaseHistory.Releases[0].Version, - disableHooks: u.disableHooks, + out: u.out, + client: u.client, + name: u.release, + dryRun: u.dryRun, + recreate: u.recreate, + force: u.force, + timeout: u.timeout, + wait: u.wait, + description: "", + revision: releaseHistory.Releases[0].Version, + disableHooks: u.disableHooks, + cleanupOnFail: u.cleanupOnFail, } if err := rollback.run(); err != nil { return err