controller

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClientGoMetrics added in v1.6.0

func InitClientGoMetrics()

func InitWorkQueueMetrics added in v1.6.0

func InitWorkQueueMetrics()

Types

type Configuration

type Configuration struct {
	BindAddress    string
	OvnNbAddr      string
	OvnSbAddr      string
	OvnTimeout     int
	KubeConfigFile string
	KubeClient     kubernetes.Interface
	KubeOvnClient  clientset.Interface

	DefaultLogicalSwitch string
	DefaultCIDR          string
	DefaultGateway       string
	DefaultExcludeIps    string

	ClusterRouter     string
	NodeSwitch        string
	NodeSwitchCIDR    string
	NodeSwitchGateway string

	ClusterTcpLoadBalancer        string
	ClusterUdpLoadBalancer        string
	ClusterTcpSessionLoadBalancer string
	ClusterUdpSessionLoadBalancer string

	PodName      string
	PodNamespace string

	WorkerNum int
	PprofPort int

	NetworkType          string
	DefaultProviderName  string
	DefaultHostInterface string
	DefaultVlanName      string
	DefaultVlanRange     string
	DefaultVlanID        int
}

Configuration is the controller conf

func ParseFlags

func ParseFlags() (*Configuration, error)

ParseFlags parses cmd args then init kubeclient and conf TODO: validate configuration

type Controller

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

Controller is kube-ovn main controller that watch ns/pod/node/svc/ep and operate ovn

func NewController

func NewController(config *Configuration) *Controller

NewController returns a new ovn controller

func (*Controller) InitDefaultVpc added in v1.6.0

func (c *Controller) InitDefaultVpc() error

func (*Controller) InitIPAM added in v1.1.0

func (c *Controller) InitIPAM() error

func (*Controller) InitOVN added in v1.0.0

func (c *Controller) InitOVN() error

func (*Controller) Run

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

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.

Jump to

Keyboard shortcuts

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