controller

package
v1.10.8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClientGoMetrics added in v1.7.0

func InitClientGoMetrics()

func InitWorkQueueMetrics added in v1.7.0

func InitWorkQueueMetrics()

Types

type Configuration

type Configuration struct {
	BindAddress          string
	OvnNbAddr            string
	OvnSbAddr            string
	OvnTimeout           int
	CustCrdRetryMaxDelay int
	KubeConfigFile       string
	KubeRestConfig       *rest.Config

	KubeClient      kubernetes.Interface
	KubeOvnClient   clientset.Interface
	AttachNetClient attacnetclientset.Interface
	KubevirtClient  kubecli.KubevirtClient

	// with no timeout
	KubeFactoryClient    kubernetes.Interface
	KubeOvnFactoryClient clientset.Interface

	DefaultLogicalSwitch  string
	DefaultCIDR           string
	DefaultGateway        string
	DefaultExcludeIps     string
	DefaultGatewayCheck   bool
	DefaultLogicalGateway bool

	ClusterRouter     string
	NodeSwitch        string
	NodeSwitchCIDR    string
	NodeSwitchGateway string

	ServiceClusterIPRange string

	ClusterTcpLoadBalancer        string
	ClusterUdpLoadBalancer        string
	ClusterTcpSessionLoadBalancer string
	ClusterUdpSessionLoadBalancer string

	PodName      string
	PodNamespace string
	PodNicType   string

	WorkerNum       int
	PprofPort       int
	EnablePprof     bool
	NodePgProbeTime int

	NetworkType             string
	DefaultProviderName     string
	DefaultHostInterface    string
	DefaultExchangeLinkName bool
	DefaultVlanName         string
	DefaultVlanID           int
	LsDnatModDlDst          bool

	EnableLb          bool
	EnableNP          bool
	EnableEipSnat     bool
	EnableExternalVpc bool
	EnableEcmp        bool
	EnableKeepVmIP    bool

	ExternalGatewayConfigNS string
	ExternalGatewayNet      string
	ExternalGatewayVlanID   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) CheckGatewayReady added in v1.7.0

func (c *Controller) CheckGatewayReady()

func (*Controller) CheckNodePortGroup added in v1.8.0

func (c *Controller) CheckNodePortGroup()

func (*Controller) EnsureChassisConsistency added in v1.9.9

func (c *Controller) EnsureChassisConsistency(node *v1.Node) error

func (*Controller) EnsureChassisOnlyForClusterNodes added in v1.9.9

func (c *Controller) EnsureChassisOnlyForClusterNodes(node *v1.Node) error

func (*Controller) GenVpcLoadBalancer added in v1.8.0

func (c *Controller) GenVpcLoadBalancer(vpcKey string) *VpcLoadBalancer

func (*Controller) GetEip added in v1.10.0

func (c *Controller) GetEip(eipName string) (*kubeovnv1.IptablesEIP, error)

func (*Controller) GetGw added in v1.10.0

func (c *Controller) GetGw() (string, error)

func (*Controller) InitDefaultVpc added in v1.7.0

func (c *Controller) InitDefaultVpc() error

func (*Controller) InitIPAM added in v1.7.0

func (c *Controller) InitIPAM() error

func (*Controller) InitOVN added in v1.7.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.

func (*Controller) SynRouteToPolicy added in v1.9.6

func (c *Controller) SynRouteToPolicy()

type VpcLoadBalancer added in v1.8.0

type VpcLoadBalancer struct {
	TcpLoadBalancer     string
	TcpSessLoadBalancer string
	UdpLoadBalancer     string
	UdpSessLoadBalancer string
}

Jump to

Keyboard shortcuts

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