From 489c49e7263881c3744f7122f165931a3de9dac7 Mon Sep 17 00:00:00 2001 From: Poorna Krishnamoorthy Date: Mon, 30 Dec 2024 10:00:11 -0800 Subject: [PATCH] fix ilm rule edit for --expire-all-object-versions 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) }