Skip to content

Commit a8fe9df

Browse files
committed
fix(controller): correct ExternalIDs filter logic in diffPolicyRouteWithLogical
Cherry-pick of kubeovn#6577 accidentally inverted the isU2ORoutePolicy condition, causing all existing policies with empty ExternalIDs to be skipped, leading to spurious dels/adds on every reconcile. Restore the correct filter: skip vpc-egress-gateway, subnet-owned, and isU2ORoutePolicy routes (not user-defined policy routes).
1 parent 941e5d6 commit a8fe9df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controller/vpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,8 @@ func diffPolicyRouteWithLogical(exists []*ovnnb.LogicalRouterPolicy, target []*k
10791079
existsMap = make(map[string]*kubeovnv1.PolicyRoute, len(exists))
10801080

10811081
for _, item := range exists {
1082-
if item.ExternalIDs["vpc-egress-gateway"] != "" ||
1083-
item.ExternalIDs["isU2ORoutePolicy"] != "true" {
1082+
if item.ExternalIDs["vpc-egress-gateway"] != "" || item.ExternalIDs["subnet"] != "" ||
1083+
item.ExternalIDs["isU2ORoutePolicy"] == "true" {
10841084
continue
10851085
}
10861086
policy := &kubeovnv1.PolicyRoute{

0 commit comments

Comments
 (0)