diff --git a/pkg/driver/agent.go b/pkg/driver/agent.go index ddbba831..d89a49c6 100644 --- a/pkg/driver/agent.go +++ b/pkg/driver/agent.go @@ -66,7 +66,8 @@ func NewNode(d *CSIDriver) csi.NodeServer { // start the lvm node resource watcher go func() { - err := lvmnode.Start(d.config.NodeControllerPollingInterval, &ControllerMutex, stopCh) + err := lvmnode. + Start(&ControllerMutex, stopCh, d.config.NodeControllerPollingInterval) if err != nil { klog.Fatalf("Failed to start LVM node controller: %s", err.Error()) } diff --git a/pkg/mgmt/lvmnode/start.go b/pkg/mgmt/lvmnode/start.go index b3ea8776..3b242d0f 100644 --- a/pkg/mgmt/lvmnode/start.go +++ b/pkg/mgmt/lvmnode/start.go @@ -35,7 +35,7 @@ import ( ) // Start starts the lvmnode controller. -func Start(pollInterval int, controllerMtx *sync.RWMutex, stopCh <-chan struct{}) error { +func Start(controllerMtx *sync.RWMutex, stopCh <-chan struct{}, pollInterval int) error { // Get in cluster config cfg, err := k8sapi.Config().Get()