Documentation ¶
Index ¶
- func CleanupClusterNode(name string) error
- func DelMgtPortIptRules()
- func DummyNextHopIPs() []net.IP
- type BaseNodeNetworkController
- type CommonNodeNetworkControllerInfo
- type DefaultNodeNetworkController
- type Gateway
- type GatewayInterfaceMismatchError
- type ManagementPort
- type SecondaryNodeNetworkController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupClusterNode ¶
CleanupClusterNode cleans up OVS resources on the k8s node on ovnkube-node daemonset deletion. This is going to be a best effort cleanup.
func DelMgtPortIptRules ¶
func DelMgtPortIptRules()
DelMgtPortIptRules delete all the iptable rules for the management port.
func DummyNextHopIPs ¶
DummyNextHopIPs returns the fake next hops used for service traffic routing. It is used in: - br-ex, where we don't really care about the next hop GW in use as traffic is always routed to OVN - OVN, only when there is no default GW as it wouldn't matter since there is no external traffic
Types ¶
type BaseNodeNetworkController ¶
type BaseNodeNetworkController struct { CommonNodeNetworkControllerInfo // network information util.NetInfo // contains filtered or unexported fields }
BaseNodeNetworkController structure per-network fields and network specific configuration
type CommonNodeNetworkControllerInfo ¶
type CommonNodeNetworkControllerInfo struct { Kube kube.Interface // contains filtered or unexported fields }
func NewCommonNodeNetworkControllerInfo ¶
func NewCommonNodeNetworkControllerInfo(kubeClient clientset.Interface, apbExternalRouteClient adminpolicybasedrouteclientset.Interface, wf factory.NodeWatchFactory, eventRecorder record.EventRecorder, name string) *CommonNodeNetworkControllerInfo
NewCommonNodeNetworkControllerInfo creates and returns the base node network controller info
type DefaultNodeNetworkController ¶
type DefaultNodeNetworkController struct { BaseNodeNetworkController // contains filtered or unexported fields }
DefaultNodeNetworkController is the object holder for utilities meant for node management of default network
func NewDefaultNodeNetworkController ¶
func NewDefaultNodeNetworkController(cnnci *CommonNodeNetworkControllerInfo) (*DefaultNodeNetworkController, error)
NewDefaultNodeNetworkController creates a new network controller for node management of the default network
func (*DefaultNodeNetworkController) Start ¶
func (nc *DefaultNodeNetworkController) Start(ctx context.Context) error
Start learns the subnets assigned to it by the master controller and calls the SetupNode script which establishes the logical switch
func (*DefaultNodeNetworkController) Stop ¶
func (nc *DefaultNodeNetworkController) Stop()
Stop gracefully stops the controller deleteLogicalEntities will never be true for default network
func (*DefaultNodeNetworkController) WatchEndpointSlices ¶
func (nc *DefaultNodeNetworkController) WatchEndpointSlices() error
func (*DefaultNodeNetworkController) WatchNamespaces ¶
func (nc *DefaultNodeNetworkController) WatchNamespaces() error
type Gateway ¶
type Gateway interface { informer.ServiceAndEndpointsEventHandler Init(<-chan struct{}, *sync.WaitGroup) error Start() GetGatewayBridgeIface() string SetDefaultGatewayBridgeMAC(addr net.HardwareAddr) Reconcile() error }
Gateway responds to Service and Endpoint K8s events and programs OVN gateway functionality. It may also spawn threads to ensure the flow tables are kept in sync
type GatewayInterfaceMismatchError ¶
type GatewayInterfaceMismatchError struct {
// contains filtered or unexported fields
}
func (*GatewayInterfaceMismatchError) Error ¶
func (error *GatewayInterfaceMismatchError) Error() string
type ManagementPort ¶
type ManagementPort interface { // Create Management port, use annotator to update node annotation with management port details // and waiter to set up condition to wait on for management port creation Create(routeManager *routemanager.Controller, nodeAnnotator kube.Annotator, waiter *startupWaiter) (*managementPortConfig, error) // CheckManagementPortHealth checks periodically for management port health until stopChan is posted // or closed and reports any warnings/errors to log CheckManagementPortHealth(routeManager *routemanager.Controller, cfg *managementPortConfig, stopChan chan struct{}) // Currently, the management port(s) that doesn't have an assignable IP address are the following cases: // - Full mode with HW backed device (e.g. Virtual Function Representor). // - DPU mode with Virtual Function Representor. // It is up to the implementation of the ManagementPort to report whether an IP address can be assigned for the // type of ManagementPort. HasIpAddr() bool }
ManagementPort is an interface that provides creation and healthcheck for ovn-k8s management port
func NewManagementPorts ¶
func NewManagementPorts(nodeName string, hostSubnets []*net.IPNet, netdevName, rep string) []ManagementPort
NewManagementPorts creates a new ManagementPorts
type SecondaryNodeNetworkController ¶
type SecondaryNodeNetworkController struct { BaseNodeNetworkController // contains filtered or unexported fields }
SecondaryNodeNetworkController structure is the object which holds the controls for starting and reacting upon the watched resources (e.g. pods, endpoints) for secondary network
func NewSecondaryNodeNetworkController ¶
func NewSecondaryNodeNetworkController(cnnci *CommonNodeNetworkControllerInfo, netInfo util.NetInfo) *SecondaryNodeNetworkController
NewSecondaryNodeNetworkController creates a new OVN controller for creating logical network infrastructure and policy for default l3 network
func (*SecondaryNodeNetworkController) Cleanup ¶
func (nc *SecondaryNodeNetworkController) Cleanup(netName string) error
Cleanup cleans up node entities for the given secondary network
func (*SecondaryNodeNetworkController) Start ¶
func (nc *SecondaryNodeNetworkController) Start(ctx context.Context) error
Start starts the default controller; handles all events and creates all needed logical entities
func (*SecondaryNodeNetworkController) Stop ¶
func (nc *SecondaryNodeNetworkController) Stop()
Stop gracefully stops the controller
Source Files ¶
- base_node_network_controller_dpu.go
- default_node_network_controller.go
- gateway.go
- gateway_init.go
- gateway_iptables.go
- gateway_localnet.go
- gateway_shared_intf.go
- healthcheck_node.go
- healthcheck_service.go
- helper_linux.go
- management-port-dpu.go
- management-port.go
- management-port_linux.go
- node_ip_handler_linux.go
- obj_retry_gateway.go
- obj_retry_node.go
- obj_retry_test_helper.go
- openflow_manager.go
- port_claim.go
- secondary_node_network_controller.go
- startup-waiter.go