mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Merge pull request #31337 from rachelvweber/rawo/fixingWaitStrategy
Fixing rollback and uninstall client WaitStrategy
This commit is contained in:
commit
25ad74f5a7
3 changed files with 3 additions and 4 deletions
|
|
@ -553,6 +553,7 @@ func (i *Install) failRelease(rel *release.Release, err error) (*release.Release
|
|||
uninstall.DisableHooks = i.DisableHooks
|
||||
uninstall.KeepHistory = false
|
||||
uninstall.Timeout = i.Timeout
|
||||
uninstall.WaitStrategy = i.WaitStrategy
|
||||
if _, uninstallErr := uninstall.Run(i.ReleaseName); uninstallErr != nil {
|
||||
return rel, fmt.Errorf("an error occurred while uninstalling the release. original install error: %w: %w", err, uninstallErr)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ func (r *Rollback) performRollback(currentRelease, targetRelease *release.Releas
|
|||
|
||||
waiter, err := r.cfg.KubeClient.GetWaiter(r.WaitStrategy)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to set metadata visitor from target release: %w", err)
|
||||
return nil, fmt.Errorf("unable to get waiter: %w", err)
|
||||
}
|
||||
if r.WaitForJobs {
|
||||
if err := waiter.WaitWithJobs(target, r.Timeout); err != nil {
|
||||
|
|
|
|||
|
|
@ -565,9 +565,7 @@ func (u *Upgrade) failRelease(rel *release.Release, created kube.ResourceList, e
|
|||
|
||||
rollin := NewRollback(u.cfg)
|
||||
rollin.Version = filteredHistory[0].Version
|
||||
if u.WaitStrategy == kube.HookOnlyStrategy {
|
||||
rollin.WaitStrategy = kube.StatusWatcherStrategy
|
||||
}
|
||||
rollin.WaitStrategy = u.WaitStrategy
|
||||
rollin.WaitForJobs = u.WaitForJobs
|
||||
rollin.DisableHooks = u.DisableHooks
|
||||
rollin.ForceReplace = u.ForceReplace
|
||||
|
|
|
|||
Loading…
Reference in a new issue