From bf7b5f620eb448241880ed350c8bfddc1ce4aa0c Mon Sep 17 00:00:00 2001 From: Poorna Date: Thu, 2 Jan 2025 04:10:56 -0800 Subject: [PATCH] fix ilm rule edit for --expire-all-object-versions (#5101) Editing a rule with --expire-all-object-versions should be applied to existing rule properly --- cmd/ilm/options.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/ilm/options.go b/cmd/ilm/options.go index 21b3c117a7..7d85e096a5 100644 --- a/cmd/ilm/options.go +++ b/cmd/ilm/options.go @@ -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) }