routeoperator

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package routeoperator contains the needed k8s operators in order to configure each k8s node to send traffic to the gateway pod when destined to a remote cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OverlayController added in v0.3.0

type OverlayController struct {
	client.Client
	// contains filtered or unexported fields
}

OverlayController reconciles pods objects, in our case the route operators pods.

func NewOverlayController added in v0.3.0

func NewOverlayController(podIP string, vxlanDevice *overlay.VxlanDevice, nodesLock *sync.RWMutex,
	vxlanNodes map[string]string, cl client.Client) (*OverlayController, error)

NewOverlayController returns a new controller ready to be setup and started with the controller manager.

func (*OverlayController) Reconcile added in v0.3.0

func (ovc *OverlayController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile for a given pod it checks if it is our pod or not. If it is our pod than annotates it with mac address of the current vxlan device. If it is a pod running in a different node then based on the type of event: event.Create/Update it adds the peer to the vxlan overlay network if it does not exist. event.Delete it removes the peer from the vxlan overlay network if it does exist.

func (*OverlayController) SetupWithManager added in v0.3.0

func (ovc *OverlayController) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager used to set up the controller with a given manager.

type RouteController

type RouteController struct {
	client.Client
	record.EventRecorder
	liqorouting.Routing
	// contains filtered or unexported fields
}

RouteController reconciles a TunnelEndpoint object.

func NewRouteController

func NewRouteController(podIP string, vxlanDevice *overlay.VxlanDevice, router liqorouting.Routing, er record.EventRecorder,
	cl client.Client) *RouteController

NewRouteController returns a configured route controller ready to be started.

func (*RouteController) ConfigureFirewall added in v0.4.0

func (rc *RouteController) ConfigureFirewall() error

ConfigureFirewall launches a long-running go routine that ensures the firewall configuration.

func (*RouteController) Reconcile

func (rc *RouteController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handle requests on TunnelEndpoint object to create and configure routes on Nodes.

func (*RouteController) SetupSignalHandlerForRouteOperator

func (rc *RouteController) SetupSignalHandlerForRouteOperator(ctx context.Context) context.Context

SetupSignalHandlerForRouteOperator registers for SIGTERM, SIGINT. Interrupt. A stop context is returned which is closed on one of these signals.

func (*RouteController) SetupWithManager

func (rc *RouteController) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager used to set up the controller with a given manager.

type SymmetricRoutingController added in v0.3.0

type SymmetricRoutingController struct {
	client.Client
	// contains filtered or unexported fields
}

SymmetricRoutingController reconciles pods objects, in our case all the existing pods.

func NewSymmetricRoutingOperator added in v0.3.0

func NewSymmetricRoutingOperator(nodeName string, routingTableID int, vxlanDevice *overlay.VxlanDevice,
	nodesLock *sync.RWMutex, vxlanNodes map[string]string, cl client.Client) (*SymmetricRoutingController, error)

NewSymmetricRoutingOperator returns a new controller ready to be setup and started with the controller manager.

func (*SymmetricRoutingController) Reconcile added in v0.3.0

func (src *SymmetricRoutingController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile for a given pod, based on the node where the pod is running, configures a route to send the traffic through the overlay network. The route is used only for the traffic generated on remote clusters with destination address a pod running on the local cluster. The traffic for local pods should be handled by the local CNI but if the reverse path filtering is in strict mode (default) the traffic coming from a network interface where the source address is not routable by the same interface is dropped. To solve the issue it requires to set the reverse path filtering to loose mode, but some times it is not possible. To overcome the problem all the traffic sent to or coming from a peering cluster has to be routed using the overlay network.

func (*SymmetricRoutingController) SetupWithManager added in v0.3.0

func (src *SymmetricRoutingController) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager used to set up the controller with a given manager.

Jump to

Keyboard shortcuts

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