Skip to content

Commit

Permalink
apply delete all flag as well
Browse files Browse the repository at this point in the history
Signed-off-by: Shubhendu Ram Tripathi <[email protected]>
  • Loading branch information
shtripat committed Feb 6, 2024
1 parent 1b6ba33 commit ed939f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/ilm/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,12 @@ 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{}
// safe to check for delete here as delete marker would at least always come as false
if opts.ExpiredObjectAllversions != nil {
dest.Expiration.DeleteAll = lifecycle.ExpirationBoolean(*opts.ExpiredObjectAllversions)
dest.Expiration.Days = 0
dest.Expiration.Date = lifecycle.ExpirationDate{}
}
}

if opts.TransitionDate != nil {
Expand Down

0 comments on commit ed939f7

Please sign in to comment.