Commit 2165e1e5 authored by Geoff Simmons's avatar Geoff Simmons

Bugfix: check the ingress.class annotation on delete Ingress events.

parent 5e926688
......@@ -1073,13 +1073,8 @@ func (worker *NamespaceWorker) isVarnishIngress(ing *extensions.Ingress) bool {
return exists && class == worker.ingClass
}
func (worker *NamespaceWorker) syncIng(key string) error {
nsKey := worker.namespace + "/" + key
worker.log.Info("Syncing Ingress:", nsKey)
ing, err := worker.ing.Get(key)
if err != nil {
return err
}
func (worker *NamespaceWorker) chkAddOrUpdateIng(
ing *extensions.Ingress) error {
if !worker.isVarnishIngress(ing) {
worker.log.Infof("Ignoring Ingress %s/%s, Annotation '%v' "+
......@@ -1092,6 +1087,16 @@ func (worker *NamespaceWorker) syncIng(key string) error {
return worker.addOrUpdateIng(ing)
}
func (worker *NamespaceWorker) syncIng(key string) error {
nsKey := worker.namespace + "/" + key
worker.log.Info("Syncing Ingress:", nsKey)
ing, err := worker.ing.Get(key)
if err != nil {
return err
}
return worker.chkAddOrUpdateIng(ing)
}
func (worker *NamespaceWorker) addIng(key string) error {
return worker.syncIng(key)
}
......@@ -1106,5 +1111,5 @@ func (worker *NamespaceWorker) deleteIng(obj interface{}) error {
worker.log.Warnf("Delete Ingress: not found: %v", obj)
return nil
}
return worker.addOrUpdateIng(ing)
return worker.chkAddOrUpdateIng(ing)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment