cleanup if statement

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
pull/13604/head
Austin Abro 7 months ago
parent 600947b32e
commit 2948279fb9
No known key found for this signature in database
GPG Key ID: 92EB5159E403F9D6

@ -289,10 +289,8 @@ func (i *Install) RunWithContext(ctx context.Context, chrt *chart.Chart, vals ma
// Make sure if Atomic is set, that wait is set as well. This makes it so
// the user doesn't have to specify both
if i.Wait == kube.HookOnlyStrategy {
if i.Atomic {
i.Wait = kube.StatusWatcherStrategy
}
if i.Wait == kube.HookOnlyStrategy && i.Atomic {
i.Wait = kube.StatusWatcherStrategy
}
if err := i.cfg.KubeClient.SetWaiter(i.Wait); err != nil {
return nil, fmt.Errorf("failed to set kube client waiter: %w", err)

@ -155,10 +155,8 @@ func (u *Upgrade) RunWithContext(ctx context.Context, name string, chart *chart.
// Make sure if Atomic is set, that wait is set as well. This makes it so
// the user doesn't have to specify both
if u.Wait == kube.HookOnlyStrategy {
if u.Atomic {
u.Wait = kube.StatusWatcherStrategy
}
if u.Wait == kube.HookOnlyStrategy && u.Atomic {
u.Wait = kube.StatusWatcherStrategy
}
if err := u.cfg.KubeClient.SetWaiter(u.Wait); err != nil {
return nil, fmt.Errorf("failed to set kube client waiter: %w", err)

Loading…
Cancel
Save