Skip to content

Commit

Permalink
fix ilm rule edit for --expire-all-object-versions (#5101)
Browse files Browse the repository at this point in the history
Editing a rule with --expire-all-object-versions should be applied
to existing rule properly
  • Loading branch information
poornas authored Jan 2, 2025
1 parent f4dd5e4 commit bf7b5f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/ilm/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ func ApplyRuleFields(dest *lifecycle.Rule, opts LifecycleOptions) *probe.Error {
dest.Expiration.DeleteMarker = lifecycle.ExpireDeleteMarker(*opts.ExpiredObjectDeleteMarker)
dest.Expiration.Days = 0
dest.Expiration.Date = lifecycle.ExpirationDate{}
} else if opts.ExpiredObjectAllversions != nil {
}
if opts.ExpiredObjectAllversions != nil {
dest.Expiration.DeleteAll = lifecycle.ExpirationBoolean(*opts.ExpiredObjectAllversions)
}

Expand Down

0 comments on commit bf7b5f6

Please sign in to comment.