From 6c7a0a48a891ebe1137b52455abc127f62eed0e9 Mon Sep 17 00:00:00 2001 From: hepanchen Date: Thu, 16 Feb 2017 11:12:40 +0800 Subject: [PATCH] fix bug : ingress-class not work . issue: flag --ingress-class not work #269 --- core/pkg/ingress/controller/controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/pkg/ingress/controller/controller.go b/core/pkg/ingress/controller/controller.go index 5c979dcce..0431b3188 100644 --- a/core/pkg/ingress/controller/controller.go +++ b/core/pkg/ingress/controller/controller.go @@ -165,6 +165,7 @@ func newIngressController(config *Configuration) *GenericController { addIng := obj.(*extensions.Ingress) if !IsValidClass(addIng, config.IngressClass) { glog.Infof("ignoring add for ingress %v based on annotation %v", addIng.Name, ingressClassKey) + ic.ingLister.Store.Delete(addIng) return } ic.recorder.Eventf(addIng, api.EventTypeNormal, "CREATE", fmt.Sprintf("Ingress %s/%s", addIng.Namespace, addIng.Name)) @@ -183,6 +184,7 @@ func newIngressController(config *Configuration) *GenericController { oldIng := old.(*extensions.Ingress) curIng := cur.(*extensions.Ingress) if !IsValidClass(curIng, config.IngressClass) { + ic.ingLister.Store.Delete(curIng) return }