noderoute

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeAddr added in v0.4.0

func GetNodeAddr(node *corev1.Node) (net.IP, error)

GetNodeAddr gets the available IP address of a Node. GetNodeAddr will first try to get the NodeInternalIP, then try to get the NodeExternalIP. Note: Although K8s supports dual-stack, there is only a single Internal address per Node because of issue ( kubernetes/kubernetes#91940 ). The Node might have multiple addresses after the issue is fixed, and one per address family. And we should change the return type at that time.

func ParseTunnelInterfaceConfig added in v0.3.0

func ParseTunnelInterfaceConfig(
	portData *ovsconfig.OVSPortData,
	portConfig *interfacestore.OVSPortConfig) *interfacestore.InterfaceConfig

ParseTunnelInterfaceConfig initializes and returns an InterfaceConfig struct for a tunnel interface. It reads tunnel type, remote IP, IPSec PSK from the OVS interface options, and NodeName from the OVS port external_ids. nil is returned, if the OVS port and interface configurations are not valid for a tunnel interface.

Types

type Controller

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

Controller is responsible for setting up necessary IP routes and Openflow entries for inter-node traffic.

func NewNodeRouteController

func NewNodeRouteController(
	kubeClient clientset.Interface,
	informerFactory informers.SharedInformerFactory,
	client openflow.Client,
	ovsBridgeClient ovsconfig.OVSBridgeClient,
	routeClient route.Interface,
	interfaceStore interfacestore.InterfaceStore,
	networkConfig *config.NetworkConfig,
	nodeConfig *config.NodeConfig) *Controller

NewNodeRouteController instantiates a new Controller object which will process Node events and ensure connectivity between different Nodes.

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Run will create defaultWorkers workers (go routines) which will process the Node events from the workqueue.

Jump to

Keyboard shortcuts

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