Skip to content

Commit

Permalink
build the expected network policies map correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Girish Moodalbail <[email protected]>
  • Loading branch information
girishmg committed Feb 21, 2020
1 parent ea00d03 commit a437aad
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions go-controller/pkg/ovn/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ func (oc *Controller) syncNetworkPoliciesPortGroup(
npInterface)
continue
}
expectedPolicies[policy.Namespace] = map[string]bool{
policy.Name: true}

if nsMap, ok := expectedPolicies[policy.Namespace]; ok {
nsMap[policy.Name] = true
} else {
expectedPolicies[policy.Namespace] = map[string]bool{
policy.Name: true,
}
}
}

err := oc.forEachAddressSetUnhashedName(func(addrSetName, namespaceName,
Expand Down

0 comments on commit a437aad

Please sign in to comment.