diff --git a/cmd/spiderpool-agent/cmd/daemon.go b/cmd/spiderpool-agent/cmd/daemon.go index fba68af09b..a31a112f14 100644 --- a/cmd/spiderpool-agent/cmd/daemon.go +++ b/cmd/spiderpool-agent/cmd/daemon.go @@ -342,14 +342,12 @@ func initAgentServiceManagers(ctx context.Context) { } agentContext.StsManager = statefulSetManager - if agentContext.Cfg.EnableKubevirtStaticIP { - logger.Debug("Begin to initialize Kubevirt manager") - kubevirtManager := kubevirtmanager.NewKubevirtManager( - agentContext.CRDManager.GetClient(), - agentContext.CRDManager.GetAPIReader(), - ) - agentContext.KubevirtManager = kubevirtManager - } + logger.Debug("Begin to initialize Kubevirt manager") + kubevirtManager := kubevirtmanager.NewKubevirtManager( + agentContext.CRDManager.GetClient(), + agentContext.CRDManager.GetAPIReader(), + ) + agentContext.KubevirtManager = kubevirtManager logger.Debug("Begin to initialize Endpoint manager") endpointManager, err := workloadendpointmanager.NewWorkloadEndpointManager( diff --git a/cmd/spiderpool-controller/cmd/daemon.go b/cmd/spiderpool-controller/cmd/daemon.go index 64e8b635bc..90d4bef2dc 100644 --- a/cmd/spiderpool-controller/cmd/daemon.go +++ b/cmd/spiderpool-controller/cmd/daemon.go @@ -262,14 +262,12 @@ func initControllerServiceManagers(ctx context.Context) { } controllerContext.StsManager = statefulSetManager - if controllerContext.Cfg.EnableKubevirtStaticIP { - logger.Debug("Begin to initialize Kubevirt manager") - kubevirtManager := kubevirtmanager.NewKubevirtManager( - controllerContext.CRDManager.GetClient(), - controllerContext.CRDManager.GetAPIReader(), - ) - controllerContext.KubevirtManager = kubevirtManager - } + logger.Debug("Begin to initialize Kubevirt manager") + kubevirtManager := kubevirtmanager.NewKubevirtManager( + controllerContext.CRDManager.GetClient(), + controllerContext.CRDManager.GetAPIReader(), + ) + controllerContext.KubevirtManager = kubevirtManager logger.Debug("Begin to initialize Endpoint manager") endpointManager, err := workloadendpointmanager.NewWorkloadEndpointManager(