Skip to content

Commit

Permalink
vpc-nat-gateway: do not add routes for underlay subnets (#4416)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored and bobz965 committed Aug 22, 2024
1 parent ba61381 commit e729239
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/controller/vpc_nat_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,12 @@ func (c *Controller) handleUpdateNatGwSubnetRoute(natGwKey string) error {
klog.Error(err)
return err
}
if subnet.Spec.Vlan != "" && !subnet.Spec.U2OInterconnection {
continue
}
if !isOvnSubnet(subnet) || !subnet.Status.IsValidated() {
continue
}
if v4Cidr, _ := util.SplitStringIP(subnet.Spec.CIDRBlock); v4Cidr != "" {
newCIDRS = append(newCIDRS, v4Cidr)
}
Expand Down

0 comments on commit e729239

Please sign in to comment.