default value for rollback client in helm upgrade

Signed-off-by: Lucas Lu <lucasludev@gmail.com>
pull/10457/head
Lucas Lu 3 years ago
parent fc9bc2eb9b
commit cc810cc0f5

@ -63,8 +63,6 @@ type Upgrade struct {
SkipCRDs bool
// Timeout is the timeout for individual hooks/kubernetes operations
Timeout time.Duration
// UpgradeTimeout is the timeout for this entire upgrade operation
UpgradeTimeout time.Duration
// Wait determines whether the wait operation should be performed after the upgrade is requested.
Wait bool
// WaitForJobs determines whether the wait operation for the Jobs should be performed after the upgrade is requested.
@ -477,7 +475,8 @@ func (u *Upgrade) failRelease(rel *release.Release, created kube.ResourceList, e
rollin.Recreate = u.Recreate
rollin.Force = u.Force
rollin.Timeout = u.Timeout
rollin.RollbackTimeout = u.UpgradeTimeout / 2
// TODO: Implement upgrade timeout to inject as value here
rollin.RollbackTimeout = 1200 * time.Second
if rollErr := rollin.Run(rel.Name); rollErr != nil {
return rel, errors.Wrapf(rollErr, "an error occurred while rolling back the release. original upgrade error: %s", err)
}

Loading…
Cancel
Save