Skip to content

Commit

Permalink
Merge pull request #1169 from sslavic/stevo-rollback-remed-max-hist
Browse files Browse the repository at this point in the history
fix: use HelmRelease max history for rollback remediation
  • Loading branch information
stefanprodan authored Feb 11, 2025
2 parents 8dfcca2 + dda1d35 commit 15d0dc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/action/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func newRollback(config *helmaction.Configuration, obj *v2.HelmRelease, opts []R
rollback.Force = obj.GetRollback().Force
rollback.Recreate = obj.GetRollback().Recreate
rollback.CleanupOnFail = obj.GetRollback().CleanupOnFail
rollback.MaxHistory = obj.GetMaxHistory()

for _, opt := range opts {
opt(rollback)
Expand Down
1 change: 1 addition & 0 deletions internal/action/rollback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func Test_newRollback(t *testing.T) {
g.Expect(got).ToNot(BeNil())
g.Expect(got.Timeout).To(Equal(obj.Spec.Rollback.Timeout.Duration))
g.Expect(got.Force).To(Equal(obj.Spec.Rollback.Force))
g.Expect(got.MaxHistory).To(Equal(obj.GetMaxHistory()))
})

t.Run("rollback to version", func(t *testing.T) {
Expand Down

0 comments on commit 15d0dc8

Please sign in to comment.