func (c *Controller) Run(ctx context.Context, workers int) {
	defer utilruntime.HandleCrash()
	defer c.queue.ShutDown()

	klog.Infof("Starting etcdcluster controller")
	defer klog.Infof("Shutting down etcdcluster controller")

	if !cache.WaitForNamedCacheSync("etcdcluster", ctx.Done(),
		c.etcdListerSynced, c.tAppListerSynced,
		c.podListerSynced, c.svcListerSynced,
		c.secretListerSynced, c.cmListerSynced,
	) {
		return
	}

	for i := 0; i < workers; i++ {
		go wait.UntilWithContext(ctx, c.worker, time.Second)
	}
	<-ctx.Done()
}
// Run runs the etcdcluster controller.
Run runs the etcdcluster controller.
// Run runs the etcdcluster controller .
func (c *Controller) Run(ctx context.Context, workers int) {
	defer utilruntime.HandleCrash()
	defer c.queue.ShutDown()
	klog.Infof("Starting etcdcluster controller")
	defer klog.Infof("Shutting down etcdcluster controller")
	if !cache.WaitForNamedCacheSync("etcdcluster", ctx.Done(),
		c.etcdListerSynced, c.tAppListerSynced,
		c.podListerSynced, c.svcListerSynced,
		c.secretListerSynced, c.cmListerSynced,
	) {
		return
	}
	for i := 0; i < workers; i++ {
		go wait.UntilWithContext(ctx, c.worker, time.Second)
	}
	<-ctx.Done()
}
func ( c * Controller ) Run ( ctx context . Context , workers int ) { defer utilruntime . HandleCrash ( ) defer c . queue . ShutDown ( ) klog . Infof ( " " ) defer klog . Infof ( " " ) if ! cache . WaitForNamedCacheSync ( " " , ctx . Done ( ) , c . etcdListerSynced , c . tAppListerSynced , c . podListerSynced , c . svcListerSynced , c . secretListerSynced , c . cmListerSynced , ) { return } for i := 0 ; i < workers ; i ++ { go wait . UntilWithContext ( ctx , c . worker , time . Second ) } <- ctx . Done ( ) }
Run runs the etcdcluster controller.
Run runs the etcdcluster controller .