Skip to content

Commit

Permalink
add bfd check from lrp to underlay gw (#3441)
Browse files Browse the repository at this point in the history
* add bfd check from lrp to  underlay gw

* fix: logical gw external subnet

* fix: EnableEipSnat control resyncExternalGateway

---------

Signed-off-by: zhangbingbing <[email protected]>
Signed-off-by: bobz965 <[email protected]>
Co-authored-by: 张祖建 <[email protected]>
Co-authored-by: Oilbeater <[email protected]>
  • Loading branch information
3 people authored Dec 25, 2023
1 parent f7ded7d commit fea6165
Show file tree
Hide file tree
Showing 11 changed files with 690 additions and 58 deletions.
2 changes: 2 additions & 0 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ VLAN_ID="100"

if [ "$ENABLE_VLAN" = "true" ]; then
NETWORK_TYPE="vlan"
# ENABLE_EIP_SNAT is only supported when you use vpc, vlan not support
ENABLE_EIP_SNAT=${ENABLE_EIP_SNAT:-false}
if [ "$VLAN_NIC" != "" ]; then
VLAN_INTERFACE_NAME="$VLAN_NIC"
fi
Expand Down
243 changes: 243 additions & 0 deletions mocks/pkg/ovs/interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,15 @@ func (c *Controller) startWorkers(ctx context.Context) {
c.SynRouteToPolicy()
}, 5*time.Second, ctx.Done())

go wait.Until(func() {
c.resyncExternalGateway()
}, time.Second, ctx.Done())
if c.config.EnableEipSnat {
go wait.Until(func() {
// init l3 about the default vpc external lrp binding to the gw chassis
c.resyncExternalGateway()
}, time.Second, ctx.Done())

// maintain l3 ha about the vpc external lrp binding to the gw chassis
c.OVNNbClient.MonitorBFD()
}

go wait.Until(func() {
c.resyncVpcNatGwConfig()
Expand Down
Loading

0 comments on commit fea6165

Please sign in to comment.