Skip to content

Commit

Permalink
prevent multiple namespace reconcile
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyd1988 committed Jan 18, 2022
1 parent 4455c86 commit 47625c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ func (c *Controller) reconcileNamespaces(subnet *kubeovnv1.Subnet) error {
}

for _, ns := range namespaces {
if ns.Annotations != nil && util.ContainsString(subnet.Spec.Namespaces, ns.Name) && util.ContainsString(strings.Split(ns.Annotations[util.LogicalSwitchAnnotation], ","), subnet.Name) {
if ns.Annotations != nil && !util.ContainsString(subnet.Spec.Namespaces, ns.Name) && util.ContainsString(strings.Split(ns.Annotations[util.LogicalSwitchAnnotation], ","), subnet.Name) {
c.addNamespaceQueue.Add(ns.Name)
}
}
Expand Down

0 comments on commit 47625c5

Please sign in to comment.