🚒 add error message in controller
This commit is contained in:
@@ -148,12 +148,10 @@ func NewDestinationRuleController(deploymentInformer informersv1.DeploymentInfor
|
||||
}
|
||||
|
||||
func (v *DestinationRuleController) Start(stopCh <-chan struct{}) error {
|
||||
v.Run(5, stopCh)
|
||||
|
||||
return nil
|
||||
return v.Run(5, stopCh)
|
||||
}
|
||||
|
||||
func (v *DestinationRuleController) Run(workers int, stopCh <-chan struct{}) {
|
||||
func (v *DestinationRuleController) Run(workers int, stopCh <-chan struct{}) error {
|
||||
defer utilruntime.HandleCrash()
|
||||
defer v.queue.ShutDown()
|
||||
|
||||
@@ -161,7 +159,7 @@ func (v *DestinationRuleController) Run(workers int, stopCh <-chan struct{}) {
|
||||
defer log.Info("shutting down destinationrule controller")
|
||||
|
||||
if !cache.WaitForCacheSync(stopCh, v.serviceSynced, v.destinationRuleSynced, v.deploymentSynced, v.servicePolicySynced) {
|
||||
return
|
||||
return fmt.Errorf("failed to wait for caches to sync")
|
||||
}
|
||||
|
||||
for i := 0; i < workers; i++ {
|
||||
@@ -169,6 +167,7 @@ func (v *DestinationRuleController) Run(workers int, stopCh <-chan struct{}) {
|
||||
}
|
||||
|
||||
<-stopCh
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v *DestinationRuleController) enqueueService(obj interface{}) {
|
||||
|
||||
Reference in New Issue
Block a user