suppress some repeated logs.

This commit is contained in:
RainbowMango 2020-11-20 17:40:30 +08:00 committed by Kevin Wang
parent 04e95c9a74
commit 3cce1a06c1
1 changed files with 1 additions and 5 deletions

View File

@ -102,11 +102,9 @@ func newMemberClusterController(config *util.ControllerConfig) (*Controller, err
klog.Info("Setting up event handlers")
memberclusterInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
klog.Infof("Received add event. just add to queue.")
controller.enqueueEventResource(obj)
},
UpdateFunc: func(old, new interface{}) {
klog.Infof("Received update event. just add to queue.")
controller.enqueueEventResource(new)
},
DeleteFunc: func(obj interface{}) {
@ -219,7 +217,6 @@ func (c *Controller) processNextWorkItem() bool {
// Finally, if no error occurs we Forget this item so it does not
// get queued again until another change happens.
c.workqueue.Forget(obj)
klog.Infof("Successfully synced '%s'", key)
return nil
}(obj)
@ -283,10 +280,9 @@ func (c *Controller) syncHandler(key string) error {
}
// update status of the given member cluster
// TODO(RainbowMango): need to check errors and return error if update status failed.
updateIndividualClusterStatus(membercluster, c.karmadaClientSet, memberclusterClient)
klog.Infof("Sync member cluster: %s/%s", membercluster.Namespace, membercluster.Name)
return nil
}