gatewayrouter

package
v0.0.0-...-18c0211 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyBasedRoutesManager

type PolicyBasedRoutesManager struct {
	// contains filtered or unexported fields
}

func NewPolicyBasedRoutesManager

func NewPolicyBasedRoutesManager(nbClient client.Client, clusterRouterName string, netInfo util.NetInfo) *PolicyBasedRoutesManager

func (*PolicyBasedRoutesManager) AddHostCIDRPolicy

func (pbr *PolicyBasedRoutesManager) AddHostCIDRPolicy(node *v1.Node, mgmtPortIP, clusterPodSubnet string) error

AddHostCIDRPolicy adds the following policy in local-gateway-mode for UDN L2 topology to the GR 99 ip4.dst == 172.18.0.0/16 && ip4.src == 10.100.200.0/24 reroute 10.100.200.2 Since rtoe of GR is directly connected to the hostCIDR range in LGW even with the following reroute to mp0 src-ip route on GR that we add from syncNodeManagementPort: 10.100.200.0/24 10.100.200.2 src-ip the dst-ip based default OVN route takes precedence because the primary nodeCIDR range is a directly attached network to the OVN router and sends the traffic destined for other nodes to rtoe and via br-ex to outside in LGW which is not desired. Hence we need a LRP that sends all traffic destined to that primary nodeCIDR range that reroutes it to mp0 in LGW mode to override this directly attached network OVN route.

func (*PolicyBasedRoutesManager) AddSameNodeIPPolicy

func (pbr *PolicyBasedRoutesManager) AddSameNodeIPPolicy(nodeName, mgmtPortIP string, hostIfCIDR *net.IPNet, otherHostAddrs []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL