Commit 6d92abdc authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #42550 from shashidharatd/federation

Automatic merge from submit-queue Fix federation controller-manager initialization Due to #42375, the e2e tests for federation started failing. The cause is that servicecontroller.Run blocks on stopCh. In #42375, the code is reorganized and servicecontroller which was initialized last is moved to top, so all the controllers below it are not initialized. This pr fixes the issue by calling stopCh of servicecontroller in a goroutine. cc @kubernetes/sig-federation-bugs @nikhiljindal @madhusudancs
parents df70b30e 867d4956
...@@ -403,10 +403,12 @@ func (s *ServiceController) Run(workers int, stopCh <-chan struct{}) error { ...@@ -403,10 +403,12 @@ func (s *ServiceController) Run(workers int, stopCh <-chan struct{}) error {
go wait.Until(s.clusterEndpointWorker, time.Second, stopCh) go wait.Until(s.clusterEndpointWorker, time.Second, stopCh)
go wait.Until(s.clusterServiceWorker, time.Second, stopCh) go wait.Until(s.clusterServiceWorker, time.Second, stopCh)
go wait.Until(s.clusterSyncLoop, time.Second, stopCh) go wait.Until(s.clusterSyncLoop, time.Second, stopCh)
<-stopCh go func() {
glog.Infof("Shutting down Federation Service Controller") <-stopCh
s.queue.ShutDown() glog.Infof("Shutting down Federation Service Controller")
s.federatedInformer.Stop() s.queue.ShutDown()
s.federatedInformer.Stop()
}()
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment