Skip to content

Commit

Permalink
update ns annotation when subnet cidr changed (#1921)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Sep 20, 2022
1 parent f7a62ca commit ed8ba4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controller/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ func (c *Controller) handleAddNamespace(key string) error {
op = "add"
namespace.Annotations = map[string]string{}
} else {
if namespace.Annotations[util.LogicalSwitchAnnotation] == strings.Join(lss, ",") {
if namespace.Annotations[util.LogicalSwitchAnnotation] == strings.Join(lss, ",") &&
namespace.Annotations[util.CidrAnnotation] == strings.Join(cidrs, ";") &&
namespace.Annotations[util.ExcludeIpsAnnotation] == strings.Join(excludeIps, ";") {
return nil
}
}
Expand Down

0 comments on commit ed8ba4c

Please sign in to comment.