This is an automated email from the ASF dual-hosted git repository.

zhangjintao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 848a78f4 fix: ingress class not effect in resource sync logic (#1311)
848a78f4 is described below

commit 848a78f494cf42b42858e1a42a3b89f1f2ae158b
Author: xiangtianyu <[email protected]>
AuthorDate: Fri Sep 2 18:54:51 2022 +0800

    fix: ingress class not effect in resource sync logic (#1311)
    
    Co-authored-by: Sarasa Kisaragi <[email protected]>
    Co-authored-by: Xin Rong <[email protected]>
---
 pkg/providers/ingress/ingress.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pkg/providers/ingress/ingress.go b/pkg/providers/ingress/ingress.go
index 689dd0b4..50381fb1 100644
--- a/pkg/providers/ingress/ingress.go
+++ b/pkg/providers/ingress/ingress.go
@@ -429,6 +429,12 @@ func (c *ingressController) ResourceSync() {
                        continue
                }
                ing := kube.MustNewIngress(obj)
+               if !c.isIngressEffective(ing) {
+                       return
+               }
+               log.Debugw("ingress add event arrived",
+                       zap.Any("object", obj),
+               )
                c.workqueue.Add(&types.Event{
                        Type: types.EventAdd,
                        Object: kube.IngressEvent{

Reply via email to