daemon

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuccessSynced is used as part of the Event 'reason' when a VirtualRouter is synced
	SuccessSynced = "Synced"
	// ErrResourceExists is used as part of the Event 'reason' when a VirtualRouter fails
	// to sync due to a Deployment of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a Deployment already existing
	MessageResourceExists = "Resource %q already exists and is not managed by VirtualRouter"
	// MessageResourceSynced is the message used for an Event fired when a VirtualRouter
	// is synced successfully
	MessageResourceSynced = "VirtualRouter synced successfully"
)
View Source
const (
	DEFAULT_MASK_NUMBER                            int    = 200
	DEFAULT_TABLE_NUMBER                           int    = 200
	DEFAULT_VIRTURALROUTER_INTERNAL_INTERFACE_NAME string = "ethint"
	DEFAULT_VIRTURALROUTER_EXTERNAL_INTERFACE_NAME string = "ethext"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is the controller implementation for VirtualRouter resources

func NewController

func NewController(
	kubeclientset kubernetes.Interface,
	sampleclientset clientset.Interface,
	daemon *NetworkDaemon,
	podInformer coreinformers.PodInformer,
	virtualRouterInformer informers.VirtualRouterInformer) *Controller

NewController returns a new sample controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type NetworkDaemon

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

func NewDaemon

func NewDaemon(crioCfg *internalCrio.CrioConfig, netlinkCfg *internalNetlink.Config) *NetworkDaemon

func (*NetworkDaemon) AssignIPaddress

func (n *NetworkDaemon) AssignIPaddress(containerName string, ip string, netmask string, isInternal bool) error

func (*NetworkDaemon) AssignVlan

func (n *NetworkDaemon) AssignVlan(containerName string, newVlan int, oldVlan int) error

func (*NetworkDaemon) AttachingPod

func (n *NetworkDaemon) AttachingPod(podName string, virtualrouter *v1.VirtualRouter) error

func (*NetworkDaemon) ClearAll

func (n *NetworkDaemon) ClearAll() error

func (*NetworkDaemon) ClearContainer

func (n *NetworkDaemon) ClearContainer(containerName string, containerID string) error

func (*NetworkDaemon) ConnectInterface

func (n *NetworkDaemon) ConnectInterface(containerName string, isInternal bool) error

func (*NetworkDaemon) DettachingPod

func (n *NetworkDaemon) DettachingPod(podName string) error

func (*NetworkDaemon) Initialize

func (n *NetworkDaemon) Initialize() error

func (*NetworkDaemon) SetDefaultRoute2Container

func (n *NetworkDaemon) SetDefaultRoute2Container(containerName string, gatewayIP string) error

func (*NetworkDaemon) SetRouteRule2Container

func (n *NetworkDaemon) SetRouteRule2Container(containerName string, markNumber int, tableNumber int) error

func (*NetworkDaemon) Start

func (n *NetworkDaemon) Start(stopSignalCh <-chan struct{}, stopCh chan<- struct{}) error

func (*NetworkDaemon) Sync

func (n *NetworkDaemon) Sync(containerName string, virtualrouterSpec v1.VirtualRouterSpec) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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