pass stop channel to node-controller

This commit is contained in:
xuzhonghu
2018-05-15 17:08:35 +08:00
parent e34df0a26c
commit 7e894b33ee
2 changed files with 5 additions and 6 deletions

View File

@@ -216,13 +216,12 @@ func startControllers(c *cloudcontrollerconfig.CompletedConfig, rootClientBuilde
c.Generic.ComponentConfig.KubeCloudShared.NodeMonitorPeriod.Duration,
c.Extra.NodeStatusUpdateFrequency)
nodeController.Run()
nodeController.Run(stop)
time.Sleep(wait.Jitter(c.Generic.ComponentConfig.GenericComponent.ControllerStartInterval.Duration, ControllerStartJitter))
// Start the PersistentVolumeLabelController
pvlController := cloudcontrollers.NewPersistentVolumeLabelController(client("pvl-controller"), cloud)
threads := 5
go pvlController.Run(threads, stop)
go pvlController.Run(5, stop)
time.Sleep(wait.Jitter(c.Generic.ComponentConfig.GenericComponent.ControllerStartInterval.Duration, ControllerStartJitter))
// Start the service controller