diff --git a/pkg/controller/namespace.go b/pkg/controller/namespace.go index 2930b0ba17c..587c578ca74 100644 --- a/pkg/controller/namespace.go +++ b/pkg/controller/namespace.go @@ -65,6 +65,12 @@ func (c *Controller) enqueueUpdateNamespace(old, new interface{}) { c.updateNpQueue.Add(np) } } + + // in case annotations are removed by other controllers + if newNs.Annotations == nil || newNs.Annotations[util.LogicalSwitchAnnotation] == "" { + klog.Warningf("no logical switch annotation for ns %s", newNs.Name) + c.addNamespaceQueue.Add(newNs.Name) + } } func (c *Controller) runAddNamespaceWorker() {