Skip to content

Commit

Permalink
Fix image registry reconcile loop
Browse files Browse the repository at this point in the history
Signed-off-by: David Vossel <[email protected]>
  • Loading branch information
davidvossel committed Oct 13, 2022
1 parent dbf2ad3 commit 8b42849
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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{}}
}
}
Expand Down

0 comments on commit 8b42849

Please sign in to comment.