daemon

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceSet             = "services"
	SubnetSet              = "subnets"
	SubnetNatSet           = "subnets-nat"
	SubnetDistributedGwSet = "subnets-distributed-gw"
	LocalPodSet            = "local-pod-ip-nat"
	OtherNodeSet           = "other-node"
	IPSetPrefix            = "ovn"
)
View Source
const (
	NAT            = "nat"
	Prerouting     = "PREROUTING"
	Postrouting    = "POSTROUTING"
	OvnPrerouting  = "OVN-PREROUTING"
	OvnPostrouting = "OVN-POSTROUTING"
)

Variables

This section is empty.

Functions

func InitMetrics added in v1.7.0

func InitMetrics()

func InitMirror added in v1.7.0

func InitMirror(config *Configuration) error

func InitNodeGateway

func InitNodeGateway(config *Configuration) error

InitNodeGateway init ovn0

func InitOVSBridges added in v1.7.2

func InitOVSBridges() (map[string]string, error)

InitOVSBridges initializes OVS bridges

func RunServer

func RunServer(config *Configuration, controller *Controller)

RunServer runs the cniserver

Types

type Configuration

type Configuration struct {
	Iface                   string
	DPDKTunnelIface         string
	MTU                     int
	MSS                     int
	EnableMirror            bool
	MirrorNic               string
	BindSocket              string
	OvsSocket               string
	KubeConfigFile          string
	KubeClient              kubernetes.Interface
	KubeOvnClient           clientset.Interface
	NodeName                string
	ServiceClusterIPRange   string
	NodeLocalDnsIP          string
	EncapChecksum           bool
	EnablePprof             bool
	MacLearningFallback     bool
	PprofPort               int
	NetworkType             string
	CniConfDir              string
	CniConfFile             string
	CniConfName             string
	DefaultProviderName     string
	DefaultInterfaceName    string
	ExternalGatewayConfigNS string
	ExternalGatewaySwitch   string // provider network underlay vlan subnet
	EnableMetrics           bool
	// contains filtered or unexported fields
}

Configuration is the daemon conf

func ParseFlags

func ParseFlags() *Configuration

ParseFlags will parse cmd args then init kubeClient and configuration TODO: validate configuration

func (*Configuration) Init added in v1.10.0

func (config *Configuration) Init(nicBridgeMappings map[string]string) error

type Controller

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

Controller watch pod and namespace changes to update iptables, ipset and ovs qos

func NewController

func NewController(config *Configuration, podInformerFactory informers.SharedInformerFactory, nodeInformerFactory informers.SharedInformerFactory, kubeovnInformerFactory kubeovninformer.SharedInformerFactory) (*Controller, error)

NewController init a daemon controller

func (*Controller) Run

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

Run starts controller

type ControllerRuntime added in v1.10.0

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

ControllerRuntime represents runtime specific controller members

Jump to

Keyboard shortcuts

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