Skip to content

Commit

Permalink
avoid blocking rollbacks when an upgrade fails (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
elenz97 authored Oct 5, 2022
1 parent 169f1e7 commit 181c372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (c *HelmClient) upgrade(ctx context.Context, spec *ChartSpec, opts *Generic

upgradedRelease, upgradeErr := client.RunWithContext(ctx, spec.ReleaseName, helmChart, values)
if upgradeErr != nil {
if upgradedRelease != nil && opts != nil && opts.RollBack != nil {
if upgradedRelease == nil && opts != nil && opts.RollBack != nil {
return nil, opts.RollBack.RollbackRelease(spec)
}
return nil, upgradeErr
Expand Down

0 comments on commit 181c372

Please sign in to comment.