agent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Types

type BridgeConfig

type BridgeConfig struct {
	Type             string     `json:"type"`
	Bridge           string     `json:"bridge"`
	IsGateway        bool       `json:"isGateway,omitempty"`
	IsDefaultGateway bool       `json:"isDefaultGateway,omitempty"`
	ForceAddress     bool       `json:"forceAddress,omitempty"`
	HairpinMode      bool       `json:"hairpinMode,omitempty"`
	MTU              int        `json:"mtu,omitempty"`
	IPAM             IPAMConfig `json:"ipam"`
}

type CNINetConf

type CNINetConf struct {
	CNIVersion string        `json:"cniVersion,omitempty"`
	Name       string        `json:"name,omitempty"`
	Plugins    []interface{} `json:"plugins"`
}

CNINetConf describes a network.

type CapbilitiesConfig

type CapbilitiesConfig struct {
	Type         string          `json:"type"`
	Capabilities map[string]bool `json:"capabilities,omitempty"`
}

type Config

type Config struct {
	LocalCerts       []string
	SyncPeriod       time.Duration
	DebounceDuration time.Duration
	TunnelsConfPath  string
	MASQOutgoing     bool

	DummyInterfaceName string

	EnableHairpinMode bool
	NetworkPluginMTU  int
	CNI               struct {
		Version     string
		ConfDir     string
		NetworkName string
		BridgeName  string
	}

	DNS struct {
		Enabled       bool
		BindIP        string
		ClusterDomain string
		Debug         bool
		Probe         bool
	}

	Proxy struct {
		Enabled bool
		//
		Mode string
		// clusterCIDR is the CIDR range of the pods in the cluster,
		// this is a CIDR list seperated by comma, like "10.234.64.0/18,10.235.64.0/18".
		// I use clusterCIDR as name because kube-proxy use this name
		ClusterCIDR string
	}

	EnableAutoNetworking bool
	MulticastAddress     string
	MulticastToken       string
	MulticastInterval    time.Duration
	EndpointTTL          time.Duration
	BackupInterval       time.Duration
	Workdir              string

	TunnelInitTimeout uint
}

func (*Config) AddFlags

func (cfg *Config) AddFlags(fs *pflag.FlagSet)

func (Config) Manager

func (cfg Config) Manager() (*Manager, error)

func (*Config) Validate

func (cfg *Config) Validate() error

type Endpoint added in v0.6.0

type Endpoint struct {
	apis.Endpoint

	// IsLocal mark an endpoint from LAN
	IsLocal bool

	// ExpireTime works only on local endpoint
	ExpireTime time.Time `json:"-"`
}

type IPAMConfig

type IPAMConfig struct {
	Type   string     `json:"type"`
	Ranges []RangeSet `json:"ranges"`
}

type IPSet added in v0.7.0

type IPSet struct {
	IPSet    *ipset.IPSet
	EntrySet sets.String
}

type Manager

type Manager struct {
	Config
	// contains filtered or unexported fields
}

type Message added in v0.6.0

type Message struct {
	apis.Endpoint

	Token string
}

type Range

type Range struct {
	Subnet string `json:"subnet"`
}

type RangeSet

type RangeSet []Range

Jump to

Keyboard shortcuts

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