network

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MPL-2.0 Imports: 82 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.

Index

Constants

View Source
const (
	IngressChainName    = "ingress"
	PreroutingChainName = "prerouting"
)

Chain names.

Variables

This section is empty.

Functions

func GenericMergeController

func GenericMergeController[T typed.DeepCopyable[T], E typed.Extension](namespaceIn, namespaceOut resource.Namespace, mergeFunc genericMergeFunc[T, E]) controller.Controller

GenericMergeController initializes a generic merge controller for network resources.

func NewAddressMergeController

func NewAddressMergeController() controller.Controller

NewAddressMergeController initializes a AddressMergeController.

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

func NewHostnameMergeController

func NewHostnameMergeController() controller.Controller

NewHostnameMergeController initializes a HostnameMergeController.

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

func NewLinkMergeController

func NewLinkMergeController() controller.Controller

NewLinkMergeController initializes a LinkMergeController.

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

func NewOperatorMergeController

func NewOperatorMergeController() controller.Controller

NewOperatorMergeController initializes a OperatorMergeController.

OperatorMergeController merges network.OperatorSpec in network.ConfigNamespace and produces final network.OperatorSpec in network.Namespace.

func NewProbeMergeController

func NewProbeMergeController() controller.Controller

NewProbeMergeController initializes a ProbeMergeController.

ProbeMergeController merges network.ProbeSpec in network.ConfigNamespace and produces final network.ProbeSpec in network.Namespace.

func NewResolverMergeController

func NewResolverMergeController() controller.Controller

NewResolverMergeController initializes a ResolverMergeController.

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

func NewRouteMergeController

func NewRouteMergeController() controller.Controller

NewRouteMergeController initializes a RouteMergeController.

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

func NewTimeServerMergeController

func NewTimeServerMergeController() controller.Controller

NewTimeServerMergeController initializes a TimeServerMergeController.

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

func SendBondMaster

func SendBondMaster(link *network.LinkSpecSpec, bond talosconfig.NetworkBondConfig)

SendBondMaster sets the bond master spec.

func SetBondMasterLegacy

func SetBondMasterLegacy(link *network.LinkSpecSpec, bond talosconfig.Bond) error

SetBondMasterLegacy sets the bond master spec.

func SetBondSlave

func SetBondSlave(link *network.LinkSpecSpec, bond ordered.Pair[string, int])

SetBondSlave sets the bond slave spec.

func SetBridgeMaster

func SetBridgeMaster(link *network.LinkSpecSpec, bridge talosconfig.NetworkBridgeConfig)

SetBridgeMaster sets the bridge master spec.

func SetBridgeMasterLegacy

func SetBridgeMasterLegacy(link *network.LinkSpecSpec, bridge talosconfig.Bridge) error

SetBridgeMasterLegacy sets the bridge master spec.

func SetBridgeSlave

func SetBridgeSlave(link *network.LinkSpecSpec, bridge string)

SetBridgeSlave sets the bridge slave spec.

func SortBonds

func SortBonds(items *safe.List[*network.LinkSpec])

SortBonds sort resources in increasing order, except it places slave interfaces right after the bond in proper order.

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 AddressEventController

type AddressEventController struct {
	V1Alpha1Events runtime.Publisher
}

AddressEventController reports hostname+address state to the events stream.

func (*AddressEventController) Inputs

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

Inputs implements controller.Controller interface.

func (*AddressEventController) Name

func (ctrl *AddressEventController) Name() string

Name implements controller.Controller interface.

func (*AddressEventController) Outputs

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

Outputs implements controller.Controller interface.

func (*AddressEventController) 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 tracks address state based on netlink events.

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 CmdlineLinkConfig

type CmdlineLinkConfig struct {
	LinkName string
	Address  netip.Prefix
	Gateway  netip.Addr
	DHCP     bool
}

CmdlineLinkConfig contains parsed cmdline networking settings for a single link.

type CmdlineNetworking

type CmdlineNetworking struct {
	LinkConfigs      []CmdlineLinkConfig
	Hostname         string
	DNSAddresses     []netip.Addr
	NTPAddresses     []netip.Addr
	IgnoreInterfaces []string
	NetworkLinkSpecs []network.LinkSpecSpec
}

CmdlineNetworking contains parsed cmdline networking settings.

func ParseCmdlineNetwork

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

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

type DNSResolveCacheController

type DNSResolveCacheController struct {
	State  state.State
	Logger *zap.Logger
	// contains filtered or unexported fields
}

DNSResolveCacheController starts dns server on both udp and tcp ports based on finalized network configuration.

func (*DNSResolveCacheController) Inputs

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

Inputs implements controller.Controller interface.

func (*DNSResolveCacheController) Name

func (ctrl *DNSResolveCacheController) Name() string

Name implements controller.Controller interface.

func (*DNSResolveCacheController) Outputs

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

Outputs implements controller.Controller interface.

func (*DNSResolveCacheController) Run

Run implements controller.Controller interface.

type DNSUpstreamController

type DNSUpstreamController struct{}

DNSUpstreamController is a controller that manages DNS upstreams.

func (*DNSUpstreamController) Inputs

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

Inputs implements controller.Controller interface.

func (*DNSUpstreamController) Name

func (ctrl *DNSUpstreamController) Name() string

Name implements controller.Controller interface.

func (*DNSUpstreamController) Outputs

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

Outputs implements controller.Controller interface.

func (*DNSUpstreamController) Run

Run implements controller.Controller interface.

type DeviceConfigController

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

DeviceConfigController manages network.DeviceConfig based on configuration.

func (*DeviceConfigController) Inputs

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

Inputs implements controller.Controller interface.

func (*DeviceConfigController) Name

func (ctrl *DeviceConfigController) Name() string

Name implements controller.Controller interface.

func (*DeviceConfigController) Outputs

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

Outputs implements controller.Controller interface.

func (*DeviceConfigController) Run

Run implements controller.Controller interface.

type EtcFileController

type EtcFileController struct {
	V1Alpha1Mode runtime.Mode

	EtcRoot         xfs.Root
	BindMountTarget string
	// contains filtered or unexported fields
}

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 EthernetConfigController

type EthernetConfigController struct{}

EthernetConfigController manages network.EthernetSpec based on machine configuration.

func (*EthernetConfigController) Inputs

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

Inputs implements controller.Controller interface.

func (*EthernetConfigController) Name

func (ctrl *EthernetConfigController) Name() string

Name implements controller.Controller interface.

func (*EthernetConfigController) Outputs

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

Outputs implements controller.Controller interface.

func (*EthernetConfigController) Run

Run implements controller.Controller interface.

type EthernetSpecController

type EthernetSpecController struct{}

EthernetSpecController reports Ethernet link statuses.

func (*EthernetSpecController) Inputs

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

Inputs implements controller.Controller interface.

func (*EthernetSpecController) Name

func (ctrl *EthernetSpecController) Name() string

Name implements controller.Controller interface.

func (*EthernetSpecController) Outputs

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

Outputs implements controller.Controller interface.

func (*EthernetSpecController) Run

Run implements controller.Controller interface.

type EthernetStatusController

type EthernetStatusController struct{}

EthernetStatusController reports Ethernet link statuses.

func (*EthernetStatusController) Inputs

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

Inputs implements controller.Controller interface.

func (*EthernetStatusController) Name

func (ctrl *EthernetStatusController) Name() string

Name implements controller.Controller interface.

func (*EthernetStatusController) Outputs

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

Outputs implements controller.Controller interface.

func (*EthernetStatusController) Run

Run implements controller.Controller interface.

type HardwareAddrController

type HardwareAddrController struct{}

HardwareAddrController publishes the first physical link hardware address.

func (*HardwareAddrController) Inputs

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

Inputs implements controller.Controller interface.

func (*HardwareAddrController) Name

func (ctrl *HardwareAddrController) Name() string

Name implements controller.Controller interface.

func (*HardwareAddrController) Outputs

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

Outputs implements controller.Controller interface.

func (*HardwareAddrController) Run

Run implements controller.Controller interface.

type HostDNSConfigController

type HostDNSConfigController struct {
	Cmdline *procfs.Cmdline
}

HostDNSConfigController manages network.HostDNSConfig based on machine configuration.

func (*HostDNSConfigController) Inputs

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

Inputs implements controller.Controller interface.

func (*HostDNSConfigController) Name

func (ctrl *HostDNSConfigController) Name() string

Name implements controller.Controller interface.

func (*HostDNSConfigController) Outputs

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

Outputs implements controller.Controller interface.

func (*HostDNSConfigController) Run

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 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 LinkAliasConfigController

type LinkAliasConfigController struct{}

LinkAliasConfigController manages network.LinkAliasSpec based on machine configuration, list of links, etc.

func (*LinkAliasConfigController) Inputs

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

Inputs implements controller.Controller interface.

func (*LinkAliasConfigController) Name

func (ctrl *LinkAliasConfigController) Name() string

Name implements controller.Controller interface.

func (*LinkAliasConfigController) Outputs

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

Outputs implements controller.Controller interface.

func (*LinkAliasConfigController) Run

Run implements controller.Controller interface.

type LinkAliasSpecController

type LinkAliasSpecController struct{}

LinkAliasSpecController applies network.LinkAliasSpec to the actual interfaces.

func (*LinkAliasSpecController) Inputs

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

Inputs implements controller.Controller interface.

func (*LinkAliasSpecController) Name

func (ctrl *LinkAliasSpecController) Name() string

Name implements controller.Controller interface.

func (*LinkAliasSpecController) Outputs

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

Outputs implements controller.Controller interface.

func (*LinkAliasSpecController) 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 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 tracks link state based on netlink and ethtool data.

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 NfTablesChainConfigController

type NfTablesChainConfigController struct{}

NfTablesChainConfigController generates nftables rules based on machine configuration.

func (*NfTablesChainConfigController) Inputs

Inputs implements controller.Controller interface.

func (*NfTablesChainConfigController) Name

Name implements controller.Controller interface.

func (*NfTablesChainConfigController) Outputs

Outputs implements controller.Controller interface.

func (*NfTablesChainConfigController) Run

Run implements controller.Controller interface.

type NfTablesChainController

type NfTablesChainController struct {
	TableName string
}

NfTablesChainController applies network.NfTablesChain to the Linux nftables interface.

func (*NfTablesChainController) Inputs

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

Inputs implements controller.Controller interface.

func (*NfTablesChainController) Name

func (ctrl *NfTablesChainController) Name() string

Name implements controller.Controller interface.

func (*NfTablesChainController) Outputs

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

Outputs implements controller.Controller interface.

func (*NfTablesChainController) Run

Run implements controller.Controller interface.

type NodeAddressController

type NodeAddressController struct{}

NodeAddressController derives node address views from link/address state.

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 NodeAddressSortAlgorithmController

type NodeAddressSortAlgorithmController struct{}

NodeAddressSortAlgorithmController manages NodeAddressSortAlgorithm based on configuration.

func (*NodeAddressSortAlgorithmController) Inputs

Inputs implements controller.Controller interface.

func (*NodeAddressSortAlgorithmController) Name

Name implements controller.Controller interface.

func (*NodeAddressSortAlgorithmController) Outputs

Outputs implements controller.Controller interface.

func (*NodeAddressSortAlgorithmController) 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 OperatorVIPConfigController

type OperatorVIPConfigController struct {
	Cmdline *procfs.Cmdline
}

OperatorVIPConfigController manages network.OperatorSpec for virtual IPs based on machine configuration.

func (*OperatorVIPConfigController) Inputs

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

Inputs implements controller.Controller interface.

func (*OperatorVIPConfigController) Name

func (ctrl *OperatorVIPConfigController) Name() string

Name implements controller.Controller interface.

func (*OperatorVIPConfigController) Outputs

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

Outputs implements controller.Controller interface.

func (*OperatorVIPConfigController) Run

Run implements controller.Controller interface.

type PlatformConfigApplyController

type PlatformConfigApplyController struct {
	V1alpha1Platform v1alpha1runtime.Platform
}

PlatformConfigApplyController applies active (or cached) platform network config to the network stack.

func (*PlatformConfigApplyController) Inputs

Inputs implements controller.Controller interface.

func (*PlatformConfigApplyController) Name

Name implements controller.Controller interface.

func (*PlatformConfigApplyController) Outputs

Outputs implements controller.Controller interface.

func (*PlatformConfigApplyController) Run

Run implements controller.Controller interface.

type PlatformConfigController

type PlatformConfigController struct {
	V1alpha1Platform v1alpha1runtime.Platform
	PlatformState    state.State
}

PlatformConfigController runs the platform config acquire code and publishes the result as a resource.

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 PlatformConfigLoadController

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

PlatformConfigLoadController loads cached platform network config from STATE.

func (*PlatformConfigLoadController) Inputs

Inputs implements controller.Controller interface.

func (*PlatformConfigLoadController) Name

func (ctrl *PlatformConfigLoadController) Name() string

Name implements controller.Controller interface.

func (*PlatformConfigLoadController) Outputs

Outputs implements controller.Controller interface.

func (*PlatformConfigLoadController) Run

Run implements controller.Controller interface.

type PlatformConfigStoreController

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

PlatformConfigStoreController stores (caches) active platform network config in STATE.

func (*PlatformConfigStoreController) Inputs

Inputs implements controller.Controller interface.

func (*PlatformConfigStoreController) Name

Name implements controller.Controller interface.

func (*PlatformConfigStoreController) Outputs

Outputs implements controller.Controller interface.

func (*PlatformConfigStoreController) Run

Run implements controller.Controller interface.

type ProbeConfigController

type ProbeConfigController struct{}

ProbeConfigController manages network.ProbeSpec based on ProbeConfig documents in machine configuration.

func (*ProbeConfigController) Inputs

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

Inputs implements controller.Controller interface.

func (*ProbeConfigController) Name

func (ctrl *ProbeConfigController) Name() string

Name implements controller.Controller interface.

func (*ProbeConfigController) Outputs

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

Outputs implements controller.Controller interface.

func (*ProbeConfigController) Run

Run implements controller.Controller interface.

type ProbeController

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

ProbeController runs network probes configured with ProbeSpecs and outputs ProbeStatuses.

func (*ProbeController) Inputs

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

Inputs implements controller.Controller interface.

func (*ProbeController) Name

func (ctrl *ProbeController) Name() string

Name implements controller.Controller interface.

func (*ProbeController) Outputs

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

Outputs implements controller.Controller interface.

func (*ProbeController) Run

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

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 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 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 tracks route state based on netlink events.

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 {
	V1Alpha1Mode runtime.Mode
}

StatusController manages network.Status based on state of other resources.

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

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 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
internal
addressutil
Package addressutil contains helpers working with addresses.
Package addressutil contains helpers working with addresses.
probe
Package probe contains implementation of the network probe runners.
Package probe contains implementation of the network probe runners.
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 networkutils provides utilities for controllers to interact with network resources.
Package networkutils provides utilities for controllers to interact with network resources.
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