sync kubevirt version to operator version when no imageTag/imageRegistry is configured
@@ -595,24 +595,16 @@ func (c *KubeVirtController) deleteAllInstallStrategy() error {
func (c *KubeVirtController) getImageTag(kv *v1.KubeVirt) string {
if kv.Spec.ImageTag == "" {
- if kv.Status.TargetKubeVirtVersion != "" {
- return kv.Status.TargetKubeVirtVersion
- } else {
return c.config.ImageTag
}
- }
return kv.Spec.ImageTag
}
func (c *KubeVirtController) getImageRegistry(kv *v1.KubeVirt) string {
if kv.Spec.ImageRegistry == "" {
- if kv.Status.TargetKubeVirtRegistry != "" {
- return kv.Status.TargetKubeVirtRegistry
- } else {
return c.config.ImageRegistry
}
- }
return kv.Spec.ImageRegistry
}
