mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 09:57:52 +00:00
Make controller Run methods consistent
- startup/shutdown logging - wait for cache sync logging - defer utilruntime.HandleCrash() - wait for stop channel before exiting
This commit is contained in:
@@ -116,7 +116,8 @@ func (ttlc *TTLController) Run(workers int, stopCh <-chan struct{}) {
|
||||
|
||||
glog.Infof("Starting TTL controller")
|
||||
defer glog.Infof("Shutting down TTL controller")
|
||||
if !cache.WaitForCacheSync(stopCh, ttlc.hasSynced) {
|
||||
|
||||
if !controller.WaitForCacheSync("TTL", stopCh, ttlc.hasSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user