AlinsRan commented on code in PR #1311:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/1311#discussion_r961302823


##########
pkg/providers/ingress/ingress.go:
##########
@@ -428,7 +412,15 @@ func (c *ingressController) ResourceSync() {
                if !c.namespaceProvider.IsWatchingNamespace(key) {
                        continue
                }
+
                ing := kube.MustNewIngress(obj)
+               if !c.isIngressEffective(ing) {
+                       log.Debugw("ignore noneffective ingress add event",

Review Comment:
   Only the log of the sync object should be printed, and the sync should not 
care about the ingresssclass log.



##########
pkg/providers/ingress/ingress.go:
##########
@@ -324,13 +319,7 @@ func (c *ingressController) onUpdate(oldObj, newObj 
interface{}) {
        if !c.namespaceProvider.IsWatchingNamespace(key) {
                return
        }
-       valid := c.isIngressEffective(curr)
-       if valid {
-               log.Debugw("ingress update event arrived",
-                       zap.Any("new object", newObj),
-                       zap.Any("old object", oldObj),
-               )
-       } else {
+       if !c.isIngressEffective(curr) {

Review Comment:
   Ditto.



##########
pkg/providers/ingress/ingress.go:
##########
@@ -286,12 +286,7 @@ func (c *ingressController) onAdd(obj interface{}) {
        }
 
        ing := kube.MustNewIngress(obj)
-       valid := c.isIngressEffective(ing)
-       if valid {
-               log.Debugw("ingress add event arrived",
-                       zap.Any("object", obj),
-               )
-       } else {
+       if !c.isIngressEffective(ing) {

Review Comment:
   These places do not need to be changed, and the debug log needs to be kept.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to