Skip to content

Commit 6c7a0a4

Browse files
author
hepanchen
committed
fix bug : ingress-class not work . issue: flag --ingress-class not work #269
1 parent 9bba947 commit 6c7a0a4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/pkg/ingress/controller/controller.go

+2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ func newIngressController(config *Configuration) *GenericController {
165165
addIng := obj.(*extensions.Ingress)
166166
if !IsValidClass(addIng, config.IngressClass) {
167167
glog.Infof("ignoring add for ingress %v based on annotation %v", addIng.Name, ingressClassKey)
168+
ic.ingLister.Store.Delete(addIng)
168169
return
169170
}
170171
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 {
183184
oldIng := old.(*extensions.Ingress)
184185
curIng := cur.(*extensions.Ingress)
185186
if !IsValidClass(curIng, config.IngressClass) {
187+
ic.ingLister.Store.Delete(curIng)
186188
return
187189
}
188190

0 commit comments

Comments
 (0)