From 8b428494ba31885b69c448f7e64288f228983a7f Mon Sep 17 00:00:00 2001 From: David Vossel Date: Fri, 7 Oct 2022 17:17:36 -0400 Subject: [PATCH] Fix image registry reconcile loop Signed-off-by: David Vossel --- .../controllers/resources/registry/registry.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/control-plane-operator/hostedclusterconfigoperator/controllers/resources/registry/registry.go b/control-plane-operator/hostedclusterconfigoperator/controllers/resources/registry/registry.go index 31e2d173f7..53a28b5390 100644 --- a/control-plane-operator/hostedclusterconfigoperator/controllers/resources/registry/registry.go +++ b/control-plane-operator/hostedclusterconfigoperator/controllers/resources/registry/registry.go @@ -25,7 +25,9 @@ func ReconcileRegistryConfig(cfg *imageregistryv1.Config, platform hyperv1.Platf if cfg.Spec.HTTPSecret == "" { cfg.Spec.HTTPSecret = generateImageRegistrySecret() } - if platform == hyperv1.KubevirtPlatform || platform == hyperv1.NonePlatform { + if (platform == hyperv1.KubevirtPlatform || platform == hyperv1.NonePlatform) && + cfg.Spec.Storage.EmptyDir == nil { + cfg.Spec.Storage = imageregistryv1.ImageRegistryConfigStorage{EmptyDir: &imageregistryv1.ImageRegistryConfigStorageEmptyDir{}} } }