From 0fee6a96b26cad05419f80f92a2512c15d8ba696 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Wed, 9 Oct 2024 12:40:13 -0400 Subject: [PATCH] [OSPRH-10612] fix persistent field defaulting --- api/v1beta1/metricstorage_webhook.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/v1beta1/metricstorage_webhook.go b/api/v1beta1/metricstorage_webhook.go index c353656c..ba9faf4a 100644 --- a/api/v1beta1/metricstorage_webhook.go +++ b/api/v1beta1/metricstorage_webhook.go @@ -81,7 +81,9 @@ func (storage *Storage) Default() { storage.Retention = "24h" } if storage.Strategy == "persistent" { - storage.Persistent = &PersistentStorage{} + if storage.Persistent == nil { + storage.Persistent = &PersistentStorage{} + } storage.Persistent.Default() } else { storage.Persistent = nil