config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent           = "hybridnet-daemon"
	DefaultBindPort     = 11021
	DefaultVxlanUDPPort = 8472

	DefaultVlanCheckTimeout                     = 3 * time.Second
	DefaultIptablesCheckDuration                = 5 * time.Second
	DefaultVxlanBaseReachableTime               = 5 * time.Second
	DefaultVxlanExpiredNeighCachesClearInterval = 1 * time.Hour

	DefaultNeighGCThresh1 = 1024
	DefaultNeighGCThresh2 = 2048
	DefaultNeighGCThresh3 = 4096

	DefaultLocalDirectTableNum     = 39999
	DefaultToOverlaySubnetTableNum = 40000
	DefaultOverlayMarkTableNum     = 40001
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	BindSocket     string
	KubeConfigFile string
	NodeName       string

	VlanMTU  int
	VxlanMTU int

	NodeVlanIfName             string
	NodeVxlanIfName            string
	ExtraNodeLocalVxlanIPCidrs []*net.IPNet

	BindPort     int
	VxlanUDPPort int

	VlanCheckTimeout                     time.Duration
	IptablesCheckDuration                time.Duration
	VxlanBaseReachableTime               time.Duration
	VxlanExpiredNeighCachesClearInterval time.Duration

	// Use fixed table num to mark "local-pod-direct rule"
	LocalDirectTableNum int

	// Use fixed table num to mark "to-overlay-pod-subnet rule"
	ToOverlaySubnetTableNum int

	// Use fixed table num to mark "overlay-mark-table rule"
	OverlayMarkTableNum int

	KubeClient      kubernetes.Interface
	HybridnetClient clientset.Interface

	NeighGCThresh1 int
	NeighGCThresh2 int
	NeighGCThresh3 int
}

Configuration is the daemon conf

func ParseFlags

func ParseFlags() (*Configuration, error)

ParseFlags will parse cmd args then init kubeClient and configuration

Jump to

Keyboard shortcuts

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