daemon

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 79 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"
	NatOutGoingPolicySubnetSet = "subnets-nat-policy"
	NatOutGoingPolicyRuleSet   = "natpr-"
)
View Source
const (
	NAT                        = util.NAT
	MANGLE                     = util.Mangle
	Prerouting                 = util.Prerouting
	Postrouting                = util.Postrouting
	Output                     = util.Output
	OvnPrerouting              = util.OvnPrerouting
	OvnPostrouting             = util.OvnPostrouting
	OvnOutput                  = util.OvnOutput
	OvnMasquerade              = util.OvnMasquerade
	OvnNatOutGoingPolicy       = util.OvnNatOutGoingPolicy
	OvnNatOutGoingPolicySubnet = util.OvnNatOutGoingPolicySubnet
)
View Source
const (
	OnOutGoingNatMark     = "0x90001/0x90001"
	OnOutGoingForwardMark = "0x90002/0x90002"
	TProxyOutputMark      = util.TProxyOutputMark
	TProxyOutputMask      = util.TProxyOutputMask
	TProxyPreroutingMark  = util.TProxyPreroutingMark
	TProxyPreroutingMask  = util.TProxyPreroutingMask
)

Variables

This section is empty.

Functions

func GetDefaultRouteDst added in v1.12.0

func GetDefaultRouteDst(protocol string) net.IPNet

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

func TurnOffNicTxChecksum added in v1.13.0

func TurnOffNicTxChecksum(nicName string) error

Types

type Configuration

type Configuration struct {
	InstallCNIConfig bool
	CniConfDir       string
	CniConfFile      string
	CniConfName      string

	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
	ClusterRouter             string
	NodeSwitch                string
	EncapChecksum             bool
	EnablePprof               bool
	MacLearningFallback       bool
	PprofPort                 int32
	SecureServing             bool
	NetworkType               string
	DefaultProviderName       string
	DefaultInterfaceName      string
	ExternalGatewayConfigNS   string
	ExternalGatewaySwitch     string // provider network underlay vlan subnet
	EnableMetrics             bool
	EnableOVNIPSec            bool
	EnableArpDetectIPConflict bool
	KubeletDir                string
	EnableVerboseConnCheck    bool
	TCPConnCheckPort          int32
	UDPConnCheckPort          int32
	EnableTProxy              bool
	OVSVsctlConcurrency       int32
	SetVxlanTxOff             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, stopCh <-chan struct{}, podInformerFactory, nodeInformerFactory informers.SharedInformerFactory, kubeovnInformerFactory kubeovninformer.SharedInformerFactory) (*Controller, error)

NewController init a daemon controller

func (*Controller) CreateIPSecKeys added in v1.13.0

func (c *Controller) CreateIPSecKeys() error

func (*Controller) FlushIPxfrmRule added in v1.13.0

func (c *Controller) FlushIPxfrmRule() error

func (*Controller) ManageIPSecKeys added in v1.13.0

func (c *Controller) ManageIPSecKeys() error

func (*Controller) RemoveIPSecKeys added in v1.13.0

func (c *Controller) RemoveIPSecKeys() error

func (*Controller) Run

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

Run starts controller

func (*Controller) StartIPSecService added in v1.13.0

func (c *Controller) StartIPSecService() error

func (*Controller) StartTProxyForwarding added in v1.12.0

func (c *Controller) StartTProxyForwarding()

func (*Controller) StartTProxyTCPPortProbe added in v1.12.0

func (c *Controller) StartTProxyTCPPortProbe()

func (*Controller) StopAndClearIPSecResouce added in v1.13.0

func (c *Controller) StopAndClearIPSecResouce() error

func (*Controller) StopIPSecService added in v1.13.0

func (c *Controller) StopIPSecService() error

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