Skip to content

Commit

Permalink
Merge pull request #502 from vyzigold/fix_persistent
Browse files Browse the repository at this point in the history
[OSPRH-10612] fix persistent field defaulting
  • Loading branch information
openshift-merge-bot[bot] authored Oct 10, 2024
2 parents ae8ae90 + 0fee6a9 commit 6eda59b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/v1beta1/metricstorage_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6eda59b

Please sign in to comment.