File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
virtualcluster/pkg/syncer Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,23 @@ func (s *Syncer) Run(stopChan <-chan struct{}) {
233
233
}
234
234
}()
235
235
go wait .Until (s .healthPatrol , 1 * time .Minute , stopChan )
236
+ go func () {
237
+ defer utilruntime .HandleCrash ()
238
+ defer s .queue .ShutDown ()
239
+
240
+ klog .Infof ("starting virtual cluster controller" )
241
+ defer klog .Infof ("shutting down virtual cluster controller" )
242
+
243
+ if ! cache .WaitForCacheSync (stopChan , s .virtualClusterSynced ) {
244
+ return
245
+ }
246
+
247
+ klog .V (5 ).Infof ("starting workers" )
248
+ for i := 0 ; i < s .workers ; i ++ {
249
+ go wait .Until (s .run , 1 * time .Second , stopChan )
250
+ }
251
+ <- stopChan
252
+ }()
236
253
}
237
254
238
255
// ListenAndServe initializes a server to respond to HTTP network requests on the syncer.
You can’t perform that action at this time.
0 commit comments