You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/09/01 08:29:25 UTC

[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #1311: fix ingress class not effect in resource sync

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


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

Review Comment:
   We can simplify the code here, right?
   



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org