network

package
v0.13.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MPL-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package network provides controllers which manage network resources.

Package network provides controllers which manage network resources.

Package network provides controllers which manage network resources.

Package network provides controllers which manage network resources.

Package network provides controllers which manage network resources.

Package network provides controllers which manage network resources.

Package network provides controllers which manage network resources.

Index

Constants

View Source
const DefaultRouteMetric = 1024

DefaultRouteMetric is the default route metric if no metric was specified explicitly.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressConfigController

type AddressConfigController struct {
	Cmdline      *procfs.Cmdline
	V1Alpha1Mode runtime.Mode
}

AddressConfigController manages network.AddressSpec based on machine configuration, kernel cmdline and some built-in defaults.

func (*AddressConfigController) Inputs

func (ctrl *AddressConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*AddressConfigController) Name

func (ctrl *AddressConfigController) Name() string

Name implements controller.Controller interface.

func (*AddressConfigController) Outputs

func (ctrl *AddressConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*AddressConfigController) Run

Run implements controller.Controller interface.

type AddressMergeController

type AddressMergeController struct{}

AddressMergeController merges network.AddressSpec in network.ConfigNamespace and produces final network.AddressSpec in network.Namespace.

func (*AddressMergeController) Inputs

func (ctrl *AddressMergeController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*AddressMergeController) Name

func (ctrl *AddressMergeController) Name() string

Name implements controller.Controller interface.

func (*AddressMergeController) Outputs

func (ctrl *AddressMergeController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*AddressMergeController) Run

Run implements controller.Controller interface.

type AddressSpecController

type AddressSpecController struct{}

AddressSpecController applies network.AddressSpec to the actual interfaces.

func (*AddressSpecController) Inputs

func (ctrl *AddressSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*AddressSpecController) Name

func (ctrl *AddressSpecController) Name() string

Name implements controller.Controller interface.

func (*AddressSpecController) Outputs

func (ctrl *AddressSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*AddressSpecController) Run

Run implements controller.Controller interface.

type AddressStatusController

type AddressStatusController struct{}

AddressStatusController manages secrets.Etcd based on configuration.

func (*AddressStatusController) Inputs

func (ctrl *AddressStatusController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*AddressStatusController) Name

func (ctrl *AddressStatusController) Name() string

Name implements controller.Controller interface.

func (*AddressStatusController) Outputs

func (ctrl *AddressStatusController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*AddressStatusController) Run

Run implements controller.Controller interface.

type CmdlineNetworking

type CmdlineNetworking struct {
	DHCP             bool
	Address          netaddr.IPPrefix
	Gateway          netaddr.IP
	Hostname         string
	LinkName         string
	DNSAddresses     []netaddr.IP
	NTPAddresses     []netaddr.IP
	IgnoreInterfaces []string
}

CmdlineNetworking contains parsed cmdline networking settings.

func ParseCmdlineNetwork

func ParseCmdlineNetwork(cmdline *procfs.Cmdline) (CmdlineNetworking, error)

ParseCmdlineNetwork parses `ip=` and Talos specific kernel cmdline argument producing all the available configuration options.

type EtcFileController

type EtcFileController struct{}

EtcFileController creates /etc/hostname and /etc/resolv.conf files based on finalized network configuration.

func (*EtcFileController) Inputs

func (ctrl *EtcFileController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*EtcFileController) Name

func (ctrl *EtcFileController) Name() string

Name implements controller.Controller interface.

func (*EtcFileController) Outputs

func (ctrl *EtcFileController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*EtcFileController) Run

func (ctrl *EtcFileController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type HardwareAddrController added in v0.13.0

type HardwareAddrController struct{}

HardwareAddrController manages secrets.Etcd based on configuration.

func (*HardwareAddrController) Inputs added in v0.13.0

func (ctrl *HardwareAddrController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*HardwareAddrController) Name added in v0.13.0

func (ctrl *HardwareAddrController) Name() string

Name implements controller.Controller interface.

func (*HardwareAddrController) Outputs added in v0.13.0

func (ctrl *HardwareAddrController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*HardwareAddrController) Run added in v0.13.0

Run implements controller.Controller interface.

type HostnameConfigController

type HostnameConfigController struct {
	Cmdline *procfs.Cmdline
}

HostnameConfigController manages network.HostnameSpec based on machine configuration, kernel cmdline.

func (*HostnameConfigController) Inputs

func (ctrl *HostnameConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*HostnameConfigController) Name

func (ctrl *HostnameConfigController) Name() string

Name implements controller.Controller interface.

func (*HostnameConfigController) Outputs

func (ctrl *HostnameConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*HostnameConfigController) Run

Run implements controller.Controller interface.

type HostnameMergeController

type HostnameMergeController struct{}

HostnameMergeController merges network.HostnameSpec in network.ConfigNamespace and produces final network.HostnameSpec in network.Namespace.

func (*HostnameMergeController) Inputs

func (ctrl *HostnameMergeController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*HostnameMergeController) Name

func (ctrl *HostnameMergeController) Name() string

Name implements controller.Controller interface.

func (*HostnameMergeController) Outputs

func (ctrl *HostnameMergeController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*HostnameMergeController) Run

Run implements controller.Controller interface.

type HostnameSpecController

type HostnameSpecController struct {
	V1Alpha1Mode v1alpha1runtime.Mode
}

HostnameSpecController applies network.HostnameSpec to the actual interfaces.

func (*HostnameSpecController) Inputs

func (ctrl *HostnameSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*HostnameSpecController) Name

func (ctrl *HostnameSpecController) Name() string

Name implements controller.Controller interface.

func (*HostnameSpecController) Outputs

func (ctrl *HostnameSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*HostnameSpecController) Run

Run implements controller.Controller interface.

type LinkConfigController

type LinkConfigController struct {
	Cmdline *procfs.Cmdline
}

LinkConfigController manages network.LinkSpec based on machine configuration, kernel cmdline.

func (*LinkConfigController) Inputs

func (ctrl *LinkConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*LinkConfigController) Name

func (ctrl *LinkConfigController) Name() string

Name implements controller.Controller interface.

func (*LinkConfigController) Outputs

func (ctrl *LinkConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*LinkConfigController) Run

Run implements controller.Controller interface.

type LinkMergeController

type LinkMergeController struct{}

LinkMergeController merges network.LinkSpec in network.ConfigNamespace and produces final network.LinkSpec in network.Namespace.

func (*LinkMergeController) Inputs

func (ctrl *LinkMergeController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*LinkMergeController) Name

func (ctrl *LinkMergeController) Name() string

Name implements controller.Controller interface.

func (*LinkMergeController) Outputs

func (ctrl *LinkMergeController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*LinkMergeController) Run

func (ctrl *LinkMergeController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type LinkSpecController

type LinkSpecController struct{}

LinkSpecController applies network.LinkSpec to the actual interfaces.

func (*LinkSpecController) Inputs

func (ctrl *LinkSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*LinkSpecController) Name

func (ctrl *LinkSpecController) Name() string

Name implements controller.Controller interface.

func (*LinkSpecController) Outputs

func (ctrl *LinkSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*LinkSpecController) Run

func (ctrl *LinkSpecController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type LinkStatusController

type LinkStatusController struct{}

LinkStatusController manages secrets.Etcd based on configuration.

func (*LinkStatusController) Inputs

func (ctrl *LinkStatusController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*LinkStatusController) Name

func (ctrl *LinkStatusController) Name() string

Name implements controller.Controller interface.

func (*LinkStatusController) Outputs

func (ctrl *LinkStatusController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*LinkStatusController) Run

Run implements controller.Controller interface.

type NodeAddressController

type NodeAddressController struct{}

NodeAddressController manages secrets.Etcd based on configuration.

func (*NodeAddressController) Inputs

func (ctrl *NodeAddressController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*NodeAddressController) Name

func (ctrl *NodeAddressController) Name() string

Name implements controller.Controller interface.

func (*NodeAddressController) Outputs

func (ctrl *NodeAddressController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*NodeAddressController) Run

Run implements controller.Controller interface.

type OperatorConfigController

type OperatorConfigController struct {
	Cmdline *procfs.Cmdline
}

OperatorConfigController manages network.OperatorSpec based on machine configuration, kernel cmdline.

func (*OperatorConfigController) Inputs

func (ctrl *OperatorConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*OperatorConfigController) Name

func (ctrl *OperatorConfigController) Name() string

Name implements controller.Controller interface.

func (*OperatorConfigController) Outputs

func (ctrl *OperatorConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*OperatorConfigController) Run

Run implements controller.Controller interface.

type OperatorFactory

type OperatorFactory func(*zap.Logger, *network.OperatorSpecSpec) operator.Operator

OperatorFactory creates operator based on the spec.

type OperatorSpecController

type OperatorSpecController struct {
	V1alpha1Platform v1alpha1runtime.Platform
	State            state.State

	// Factory can be overridden for unit-testing.
	Factory OperatorFactory
	// contains filtered or unexported fields
}

OperatorSpecController applies network.OperatorSpec to the actual interfaces.

func (*OperatorSpecController) Inputs

func (ctrl *OperatorSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*OperatorSpecController) Name

func (ctrl *OperatorSpecController) Name() string

Name implements controller.Controller interface.

func (*OperatorSpecController) Outputs

func (ctrl *OperatorSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*OperatorSpecController) Run

Run implements controller.Controller interface.

type PlatformConfigController

type PlatformConfigController struct {
	V1alpha1Platform v1alpha1runtime.Platform
}

PlatformConfigController manages updates hostnames and addressstatuses based on platform information.

func (*PlatformConfigController) Inputs

func (ctrl *PlatformConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*PlatformConfigController) Name

func (ctrl *PlatformConfigController) Name() string

Name implements controller.Controller interface.

func (*PlatformConfigController) Outputs

func (ctrl *PlatformConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*PlatformConfigController) Run

Run implements controller.Controller interface.

type ResolverConfigController

type ResolverConfigController struct {
	Cmdline *procfs.Cmdline
}

ResolverConfigController manages network.ResolverSpec based on machine configuration, kernel cmdline.

func (*ResolverConfigController) Inputs

func (ctrl *ResolverConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ResolverConfigController) Name

func (ctrl *ResolverConfigController) Name() string

Name implements controller.Controller interface.

func (*ResolverConfigController) Outputs

func (ctrl *ResolverConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ResolverConfigController) Run

Run implements controller.Controller interface.

type ResolverMergeController

type ResolverMergeController struct{}

ResolverMergeController merges network.ResolverSpec in network.ConfigNamespace and produces final network.ResolverSpec in network.Namespace.

func (*ResolverMergeController) Inputs

func (ctrl *ResolverMergeController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ResolverMergeController) Name

func (ctrl *ResolverMergeController) Name() string

Name implements controller.Controller interface.

func (*ResolverMergeController) Outputs

func (ctrl *ResolverMergeController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ResolverMergeController) Run

Run implements controller.Controller interface.

type ResolverSpecController

type ResolverSpecController struct{}

ResolverSpecController applies network.ResolverSpec to the actual interfaces.

func (*ResolverSpecController) Inputs

func (ctrl *ResolverSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ResolverSpecController) Name

func (ctrl *ResolverSpecController) Name() string

Name implements controller.Controller interface.

func (*ResolverSpecController) Outputs

func (ctrl *ResolverSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ResolverSpecController) Run

Run implements controller.Controller interface.

type RouteConfigController

type RouteConfigController struct {
	Cmdline *procfs.Cmdline
}

RouteConfigController manages network.RouteSpec based on machine configuration, kernel cmdline.

func (*RouteConfigController) Inputs

func (ctrl *RouteConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*RouteConfigController) Name

func (ctrl *RouteConfigController) Name() string

Name implements controller.Controller interface.

func (*RouteConfigController) Outputs

func (ctrl *RouteConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*RouteConfigController) Run

Run implements controller.Controller interface.

type RouteMergeController

type RouteMergeController struct{}

RouteMergeController merges network.RouteSpec in network.ConfigNamespace and produces final network.RouteSpec in network.Namespace.

func (*RouteMergeController) Inputs

func (ctrl *RouteMergeController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*RouteMergeController) Name

func (ctrl *RouteMergeController) Name() string

Name implements controller.Controller interface.

func (*RouteMergeController) Outputs

func (ctrl *RouteMergeController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*RouteMergeController) Run

Run implements controller.Controller interface.

type RouteSpecController

type RouteSpecController struct{}

RouteSpecController applies network.RouteSpec to the actual interfaces.

func (*RouteSpecController) Inputs

func (ctrl *RouteSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*RouteSpecController) Name

func (ctrl *RouteSpecController) Name() string

Name implements controller.Controller interface.

func (*RouteSpecController) Outputs

func (ctrl *RouteSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*RouteSpecController) Run

func (ctrl *RouteSpecController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type RouteStatusController

type RouteStatusController struct{}

RouteStatusController manages secrets.Etcd based on configuration.

func (*RouteStatusController) Inputs

func (ctrl *RouteStatusController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*RouteStatusController) Name

func (ctrl *RouteStatusController) Name() string

Name implements controller.Controller interface.

func (*RouteStatusController) Outputs

func (ctrl *RouteStatusController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*RouteStatusController) Run

Run implements controller.Controller interface.

type StatusController

type StatusController struct{}

StatusController manages secrets.Etcd based on configuration.

func (*StatusController) Inputs

func (ctrl *StatusController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*StatusController) Name

func (ctrl *StatusController) Name() string

Name implements controller.Controller interface.

func (*StatusController) Outputs

func (ctrl *StatusController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*StatusController) Run

func (ctrl *StatusController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error

Run implements controller.Controller interface.

type TimeServerConfigController

type TimeServerConfigController struct {
	Cmdline *procfs.Cmdline
}

TimeServerConfigController manages network.TimeServerSpec based on machine configuration, kernel cmdline.

func (*TimeServerConfigController) Inputs

func (ctrl *TimeServerConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*TimeServerConfigController) Name

func (ctrl *TimeServerConfigController) Name() string

Name implements controller.Controller interface.

func (*TimeServerConfigController) Outputs

func (ctrl *TimeServerConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*TimeServerConfigController) Run

Run implements controller.Controller interface.

type TimeServerMergeController

type TimeServerMergeController struct{}

TimeServerMergeController merges network.TimeServerSpec in network.ConfigNamespace and produces final network.TimeServerSpec in network.Namespace.

func (*TimeServerMergeController) Inputs

func (ctrl *TimeServerMergeController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*TimeServerMergeController) Name

func (ctrl *TimeServerMergeController) Name() string

Name implements controller.Controller interface.

func (*TimeServerMergeController) Outputs

func (ctrl *TimeServerMergeController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*TimeServerMergeController) Run

Run implements controller.Controller interface.

type TimeServerSpecController

type TimeServerSpecController struct{}

TimeServerSpecController applies network.TimeServerSpec to the actual interfaces.

func (*TimeServerSpecController) Inputs

func (ctrl *TimeServerSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*TimeServerSpecController) Name

func (ctrl *TimeServerSpecController) Name() string

Name implements controller.Controller interface.

func (*TimeServerSpecController) Outputs

func (ctrl *TimeServerSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*TimeServerSpecController) Run

Run implements controller.Controller interface.

Directories

Path Synopsis
Package operator implements network operators.
Package operator implements network operators.
vip
Package vip contains implementations of specific methods to acquire/release virtual IPs.
Package vip contains implementations of specific methods to acquire/release virtual IPs.
Package watch provides netlink watchers via multicast groups.
Package watch provides netlink watchers via multicast groups.

Jump to

Keyboard shortcuts

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