Documentation
¶
Index ¶
- Constants
- type Controller
- type NetworkDaemon
- func (n *NetworkDaemon) AssignIPaddress(containerName string, ip string, netmask string, isInternal bool) error
- func (n *NetworkDaemon) AssignVlan(containerName string, newVlan int, oldVlan int) error
- func (n *NetworkDaemon) AttachingPod(podName string, virtualrouter *v1.VirtualRouter) error
- func (n *NetworkDaemon) ClearAll() error
- func (n *NetworkDaemon) ClearContainer(containerName string, containerID string) error
- func (n *NetworkDaemon) ConnectInterface(containerName string, isInternal bool) error
- func (n *NetworkDaemon) DettachingPod(podName string) error
- func (n *NetworkDaemon) Initialize() error
- func (n *NetworkDaemon) SetDefaultRoute2Container(containerName string, gatewayIP string) error
- func (n *NetworkDaemon) SetRouteRule2Container(containerName string, markNumber int, tableNumber int) error
- func (n *NetworkDaemon) Start(stopSignalCh <-chan struct{}, stopCh chan<- struct{}) error
- func (n *NetworkDaemon) Sync(containerName string, virtualrouterSpec v1.VirtualRouterSpec) error
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 (*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
Click to show internal directories.
Click to hide internal directories.