network

package
v1.12.4 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MPL-2.0 Imports: 28 Imported by: 5

Documentation

Overview

Package network provides resources which describe networking subsystem state.

Index

Constants

View Source
const (
	LinkKindVLAN      = "vlan"
	LinkKindBond      = "bond"
	LinkKindBridge    = "bridge"
	LinkKindWireguard = "wireguard"
)

Link kinds.

View Source
const (
	// Default node address (should be a single address in the spec).
	//
	// Used to set for example published etcd peer address.
	NodeAddressDefaultID = "default"
	// Current node addresses (as seen at the moment).
	//
	// Shows a list of addresses for the node for the UP interfaces.
	NodeAddressCurrentID = "current"
	// Accumulative list of the addresses node had over time.
	//
	// If some address is no longer present, it will be still kept in the accumulative list.
	NodeAddressAccumulativeID = "accumulative"
	// Routed current node addresses (as seen at the moment).
	//
	// This is current addresses minus 'external' IPs, and SideroLink IPs.
	//
	// This list is used to pick advertised/listen addresses for different services.
	NodeAddressRoutedID = "routed"
)

NodeAddress well-known IDs.

View Source
const (
	// ULAUnknown indicates an unknown ULA Purpose.
	ULAUnknown = 0x00

	// ULABootstrap is the Unique Local Addressing space key for the Talos Self-Bootstrapping protocol.
	ULABootstrap = 0x01

	// ULAKubeSpan is the Unique Local Addressing space key for the Talos KubeSpan feature.
	ULAKubeSpan = 0x02

	// ULASideroLink is the Unique Local Addressing space key for the SideroLink feature.
	ULASideroLink = 0x03

	// ULAVirtualSideroLink is the Unique Local Addressing space key for the Virtual SideroLink over GRPC feature.
	ULAVirtualSideroLink = 0x04
)
View Source
const AddressSpecType = resource.Type("AddressSpecs.net.talos.dev")

AddressSpecType is type of AddressSpec resource.

View Source
const AddressStatusType = resource.Type("AddressStatuses.net.talos.dev")

AddressStatusType is type of AddressStatus resource.

View Source
const ConfigNamespaceName resource.Namespace = "network-config"

ConfigNamespaceName contains umerged resources related to networking generate from the configuration.

Resources in the ConfigNamespaceName namespace are merged to produce final versions in the NamespaceName namespace.

View Source
const DNSResolveCacheType = resource.Type("DNSResolveCaches.net.talos.dev")

DNSResolveCacheType is type of DNSResolveCache resource.

View Source
const DNSUpstreamType = resource.Type("DNSUpstreams.net.talos.dev")

DNSUpstreamType is type of DNSUpstream resource.

View Source
const DefaultRouteMetric = 1024

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

View Source
const DeviceConfigSpecType = resource.Type("DeviceConfigSpecs.net.talos.dev")

DeviceConfigSpecType is type of DeviceConfigSpec resource.

View Source
const EthernetSpecType = resource.Type("EthernetSpecs.net.talos.dev")

EthernetSpecType is type of EthernetSpec resource.

View Source
const EthernetStatusType = resource.Type("EthernetStatuses.net.talos.dev")

EthernetStatusType is type of EthernetStatus resource.

View Source
const FirstHardwareAddr = resource.ID("first")

FirstHardwareAddr is a resource ID for the first NIC HW addr.

View Source
const HardwareAddrType = resource.Type("HardwareAddresses.net.talos.dev")

HardwareAddrType is type of HardwareAddr resource.

View Source
const HostDNSConfigID resource.ID = "config"

HostDNSConfigID is the singleton ID for HostDNSConfig.

View Source
const HostDNSConfigType = resource.Type("HostDNSConfigs.net.talos.dev")

HostDNSConfigType is type of HostDNSConfig resource.

View Source
const HostnameID resource.ID = "hostname"

HostnameID is the ID of the singleton instance.

View Source
const HostnameSpecType = resource.Type("HostnameSpecs.net.talos.dev")

HostnameSpecType is type of HostnameSpec resource.

View Source
const HostnameStatusType = resource.Type("HostnameStatuses.net.talos.dev")

HostnameStatusType is type of HostnameStatus resource.

View Source
const LinkAliasSpecType = resource.Type("LinkAliasSpecs.net.talos.dev")

LinkAliasSpecType is type of LinkAliasSpec resource.

View Source
const LinkRefreshType = resource.Type("LinkRefreshes.net.talos.dev")

LinkRefreshType is type of LinkRefresh resource.

View Source
const LinkSpecType = resource.Type("LinkSpecs.net.talos.dev")

LinkSpecType is type of LinkSpec resource.

View Source
const LinkStatusType = resource.Type("LinkStatuses.net.talos.dev")

LinkStatusType is type of LinkStatus resource.

View Source
const NamespaceName resource.Namespace = "network"

NamespaceName contains resources related to networking.

View Source
const NfTablesChainType = resource.Type("NfTablesChains.net.talos.dev")

NfTablesChainType is type of NfTablesChain resource.

View Source
const NodeAddressFilterType = resource.Type("NodeAddressFilters.net.talos.dev")

NodeAddressFilterType is type of NodeAddressFilter resource.

View Source
const NodeAddressSortAlgorithmID = "default"

NodeAddressSortAlgorithmID is the resource ID for NodeAddressSortAlgorithm.

View Source
const NodeAddressSortAlgorithmType = resource.Type("NodeAddressSortAlgorithms.net.talos.dev")

NodeAddressSortAlgorithmType is type of NodeAddressSortAlgorithm resource.

View Source
const NodeAddressType = resource.Type("NodeAddresses.net.talos.dev")

NodeAddressType is type of NodeAddress resource.

View Source
const OperatorSpecType = resource.Type("OperatorSpecs.net.talos.dev")

OperatorSpecType is type of OperatorSpec resource.

View Source
const PlatformConfigActiveID resource.ID = "active"

PlatformConfigActiveID is the ID of instance containing active config.

View Source
const PlatformConfigCachedID resource.ID = "cached"

PlatformConfigCachedID is the ID of instance containing cached (persisted) config.

View Source
const PlatformConfigType = resource.Type("PlatformConfigs.net.talos.dev")

PlatformConfigType is type of PlatformConfig resource.

View Source
const ProbeSpecType = resource.Type("ProbeSpecs.net.talos.dev")

ProbeSpecType is type of ProbeSpec resource.

View Source
const ProbeStatusType = resource.Type("ProbeStatuses.net.talos.dev")

ProbeStatusType is type of ProbeStatus resource.

View Source
const ResolverID resource.ID = "resolvers"

ResolverID is the ID of the singleton instance.

View Source
const ResolverSpecType = resource.Type("ResolverSpecs.net.talos.dev")

ResolverSpecType is type of ResolverSpec resource.

View Source
const ResolverStatusType = resource.Type("ResolverStatuses.net.talos.dev")

ResolverStatusType is type of ResolverStatus resource.

View Source
const RouteSpecType = resource.Type("RouteSpecs.net.talos.dev")

RouteSpecType is type of RouteSpec resource.

View Source
const RouteStatusType = resource.Type("RouteStatuses.net.talos.dev")

RouteStatusType is type of RouteStatus resource.

View Source
const StatusID resource.ID = "status"

StatusID is the resource ID of the singleton instance.

View Source
const StatusType = resource.Type("NetworkStatuses.net.talos.dev")

StatusType is type of Status resource.

View Source
const TimeServerID resource.ID = "timeservers"

TimeServerID is the ID of the singleton instance.

View Source
const TimeServerSpecType = resource.Type("TimeServerSpecs.net.talos.dev")

TimeServerSpecType is type of TimeServerSpec resource.

View Source
const TimeServerStatusType = resource.Type("TimeServerStatuses.net.talos.dev")

TimeServerStatusType is type of TimeServerStatus resource.

Variables

This section is empty.

Functions

func AddressID

func AddressID(linkName string, addr netip.Prefix) string

AddressID builds ID (primary key) for the address.

func AddressReady

func AddressReady(spec *StatusSpec) bool

AddressReady checks if address is ready.

func AllLinkAliases added in v1.10.0

func AllLinkAliases(link *LinkStatus) iter.Seq[string]

AllLinkAliases returns all link aliases (altnames and alias).

func AllLinkNames added in v1.10.0

func AllLinkNames(link *LinkStatus) iter.Seq[string]

AllLinkNames returns all link names, including name, alias and altnames.

func ConfigLayerStrings added in v1.7.0

func ConfigLayerStrings() []string

ConfigLayerStrings returns a slice of all String values of the enum

func ConnectivityReady

func ConnectivityReady(spec *StatusSpec) bool

ConnectivityReady checks if connectivity is ready.

func EtcFilesReady

func EtcFilesReady(spec *StatusSpec) bool

EtcFilesReady checks if etc files are ready.

func FilteredNodeAddressID

func FilteredNodeAddressID(kind resource.ID, filterID string) resource.ID

FilteredNodeAddressID returns resource ID for node addresses with filter applied.

func HostnameReady

func HostnameReady(spec *StatusSpec) bool

HostnameReady checks if hostname is ready.

func IsULA

func IsULA(ip netip.Addr, purpose ULAPurpose) bool

IsULA checks whether IP address is a Unique Local Address with the specific purpose.

func LayeredID

func LayeredID(layer ConfigLayer, id string) string

LayeredID builds configuration for the entity at some layer.

func LinkID

func LinkID(linkName string) string

LinkID builds ID (primary key) for the link (interface).

func NotSideroLinkIP

func NotSideroLinkIP(ip netip.Addr) bool

NotSideroLinkIP is a shorthand for !IsULA(ip, ULASideroLink).

func OperatorID

func OperatorID(spec OperatorSpecSpec) string

OperatorID builds ID (primary key) for the operators.

func OperatorStrings added in v1.7.0

func OperatorStrings() []string

OperatorStrings returns a slice of all String values of the enum

func RouteID

func RouteID(table nethelpers.RoutingTable, family nethelpers.Family, destination netip.Prefix, gateway netip.Addr, priority uint32, outLinkName string) string

RouteID builds ID (primary key) for the route.

func ULAPrefix

func ULAPrefix(clusterID string, purpose ULAPurpose) netip.Prefix

ULAPrefix calculates and returns a Talos-specific Unique Local Address prefix for the given purpose. This implements a Talos-specific implementation of RFC4193. The Talos implementation uses a combination of a 48-bit cluster-unique portion with an 8-bit purpose portion.

Types

type AddressSpec

AddressSpec resource holds physical network link status.

func NewAddressSpec

func NewAddressSpec(namespace resource.Namespace, id resource.ID) *AddressSpec

NewAddressSpec initializes a AddressSpec resource.

type AddressSpecExtension added in v1.4.0

type AddressSpecExtension struct{}

AddressSpecExtension provides auxiliary methods for AddressSpec.

func (AddressSpecExtension) ResourceDefinition added in v1.4.0

func (AddressSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type AddressSpecSpec

type AddressSpecSpec struct {
	Address         netip.Prefix            `yaml:"address" protobuf:"1"`
	LinkName        string                  `yaml:"linkName" protobuf:"2"`
	Family          nethelpers.Family       `yaml:"family" protobuf:"3"`
	Scope           nethelpers.Scope        `yaml:"scope" protobuf:"4"`
	Flags           nethelpers.AddressFlags `yaml:"flags" protobuf:"5"`
	AnnounceWithARP bool                    `yaml:"announceWithARP,omitempty" protobuf:"6"`
	Priority        uint32                  `yaml:"priority,omitempty" protobuf:"8"`
	ConfigLayer     ConfigLayer             `yaml:"layer" protobuf:"7"`
}

AddressSpecSpec describes status of rendered secrets.

func (AddressSpecSpec) DeepCopy

func (o AddressSpecSpec) DeepCopy() AddressSpecSpec

DeepCopy generates a deep copy of AddressSpecSpec.

type AddressStatus

AddressStatus resource holds physical network link status.

func NewAddressStatus

func NewAddressStatus(namespace resource.Namespace, id resource.ID) *AddressStatus

NewAddressStatus initializes a AddressStatus resource.

type AddressStatusExtension added in v1.4.0

type AddressStatusExtension struct{}

AddressStatusExtension provides auxiliary methods for AddressStatus.

func (AddressStatusExtension) ResourceDefinition added in v1.4.0

func (AddressStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type AddressStatusSpec

type AddressStatusSpec struct {
	Address   netip.Prefix            `yaml:"address" protobuf:"1"`
	Local     netip.Addr              `yaml:"local,omitempty" protobuf:"2"`
	Broadcast netip.Addr              `yaml:"broadcast,omitempty" protobuf:"3"`
	Anycast   netip.Addr              `yaml:"anycast,omitempty" protobuf:"4"`
	Multicast netip.Addr              `yaml:"multicast,omitempty" protobuf:"5"`
	LinkIndex uint32                  `yaml:"linkIndex" protobuf:"6"`
	LinkName  string                  `yaml:"linkName" protobuf:"7"`
	Family    nethelpers.Family       `yaml:"family" protobuf:"8"`
	Scope     nethelpers.Scope        `yaml:"scope" protobuf:"9"`
	Flags     nethelpers.AddressFlags `yaml:"flags" protobuf:"10"`
	Priority  uint32                  `yaml:"priority" protobuf:"11"`
}

AddressStatusSpec describes status of rendered secrets.

func (AddressStatusSpec) DeepCopy

func (o AddressStatusSpec) DeepCopy() AddressStatusSpec

DeepCopy generates a deep copy of AddressStatusSpec.

type BondMasterSpec

type BondMasterSpec struct {
	// Mode specifies the bonding policy
	Mode nethelpers.BondMode `yaml:"mode" protobuf:"1"`
	// HashPolicy selects the transmit hash policy to use for slave selection.
	HashPolicy nethelpers.BondXmitHashPolicy `yaml:"xmitHashPolicy" protobuf:"2"`
	// LACPRate specifies the rate at which LACPDU frames are sent.
	LACPRate nethelpers.LACPRate `yaml:"lacpRate" protobuf:"3"`
	// ARPValidate specifies whether or not ARP probes and replies should be validated.
	ARPValidate nethelpers.ARPValidate `yaml:"arpValidate" protobuf:"4"`
	// ARPAllTargets specifies whether ARP probes should be sent to any or all targets.
	ARPAllTargets nethelpers.ARPAllTargets `yaml:"arpAllTargets" protobuf:"5"`
	// PrimaryIndex is a device index specifying which slave is the primary device.
	PrimaryIndex *uint32 `yaml:"primary,omitempty" protobuf:"6"`
	// PrimaryReselect specifies the policy under which the primary slave should be reselected.
	PrimaryReselect nethelpers.PrimaryReselect `yaml:"primaryReselect" protobuf:"7"`
	// FailOverMac whether active-backup mode should set all slaves to the same MAC address at enslavement, when enabled, or perform special handling.
	FailOverMac nethelpers.FailOverMAC `yaml:"failOverMac" protobuf:"8"`
	// ADSelect specifies the aggregate selection policy for 802.3ad.
	ADSelect nethelpers.ADSelect `yaml:"adSelect,omitempty" protobuf:"9"`
	// MIIMon is the link monitoring frequency in milliseconds.
	MIIMon uint32 `yaml:"miimon,omitempty" protobuf:"10"`
	// UpDelay is the time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.
	UpDelay uint32 `yaml:"updelay,omitempty" protobuf:"11"`
	// DownDelay is the time, in milliseconds, to wait before disabling a slave after a link failure has been detected.
	DownDelay uint32 `yaml:"downdelay,omitempty" protobuf:"12"`
	// ARPInterval is the ARP link monitoring frequency in milliseconds.
	ARPInterval uint32 `yaml:"arpInterval,omitempty" protobuf:"13"`
	// ResendIGMP specifies the number of times IGMP packets should be resent.
	ResendIGMP uint32 `yaml:"resendIgmp,omitempty" protobuf:"14"`
	// MinLinks specifies the minimum number of active links to assert carrier.
	MinLinks uint32 `yaml:"minLinks,omitempty" protobuf:"15"`
	// LPInterval specifies the number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch.
	LPInterval uint32 `yaml:"lpInterval,omitempty" protobuf:"16"`
	// PacketsPerSlave specifies the number of packets to transmit through a slave before moving to the next one.
	PacketsPerSlave uint32 `yaml:"packetsPerSlave,omitempty" protobuf:"17"`
	// NumPeerNotif specifies the number of peer notifications
	// (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements) to be issued after a failover event.
	NumPeerNotif uint8 `yaml:"numPeerNotif,omitempty" protobuf:"18"`
	// TLBDynamicLB specifies if dynamic shuffling of flows is enabled in tlb or alb mode.
	TLBDynamicLB uint8 `yaml:"tlbLogicalLb,omitempty" protobuf:"19"`
	// AllSlavesActive specifies that duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).
	AllSlavesActive uint8 `yaml:"allSlavesActive,omitempty" protobuf:"20"`
	// UseCarrier specifies whether or not miimon should use MII or ETHTOOL.
	UseCarrier bool `yaml:"useCarrier,omitempty" protobuf:"21"`
	// ADActorSysPrio is the actor system priority for 802.3ad.
	ADActorSysPrio uint16 `yaml:"adActorSysPrio,omitempty" protobuf:"22"`
	// ADUserPortKey is the user port key (upper 10 bits) for 802.3ad.
	ADUserPortKey uint16 `yaml:"adUserPortKey,omitempty" protobuf:"23"`
	// PeerNotifyDelay is the delay, in milliseconds, between each peer notification.
	PeerNotifyDelay uint32 `yaml:"peerNotifyDelay,omitempty" protobuf:"24"`
	// ARPIPTargets is the list of IP addresses to use for ARP link monitoring when ARPInterval is set.
	//
	// Maximum of 16 targets are supported.
	ARPIPTargets []netip.Addr `yaml:"arpIpTargets,omitempty" protobuf:"25"`
	// NSIP6Targets is the list of IPv6 addresses to use for NS link monitoring when ARPInterval is set.
	//
	// Maximum of 16 targets are supported.
	NSIP6Targets []netip.Addr `yaml:"nsIp6Targets,omitempty" protobuf:"26"`
	// ADLACPActive specifies whether to send LACPDU frames periodically.
	ADLACPActive nethelpers.ADLACPActive `yaml:"adLacpActive,omitempty" protobuf:"27"`
	// MissedMax is the number of arp_interval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.
	MissedMax uint8 `yaml:"missedMax,omitempty" protobuf:"28"`
}

BondMasterSpec describes bond settings if Kind == "bond".

func (BondMasterSpec) DeepCopy added in v1.12.0

func (o BondMasterSpec) DeepCopy() BondMasterSpec

DeepCopy generates a deep copy of BondMasterSpec.

func (*BondMasterSpec) Equal added in v1.12.0

func (spec *BondMasterSpec) Equal(other *BondMasterSpec) bool

Equal checks two BondMasterSpecs for equality.

func (*BondMasterSpec) IsZero added in v1.12.0

func (spec *BondMasterSpec) IsZero() bool

IsZero checks if the BondMasterSpec is zero value.

type BondSlave

type BondSlave struct {
	// MasterName indicates master link for enslaved bonded interfaces.
	MasterName string `yaml:"masterName,omitempty" protobuf:"1"`

	// SlaveIndex indicates a slave's position in bond.
	SlaveIndex int `yaml:"slaveIndex,omitempty" protobuf:"2"`
}

BondSlave contains a bond's master name and slave index.

type BridgeMasterSpec

type BridgeMasterSpec struct {
	STP  STPSpec        `yaml:"stp,omitempty" protobuf:"1"`
	VLAN BridgeVLANSpec `yaml:"vlan,omitempty" protobuf:"2"`
}

BridgeMasterSpec describes bridge settings if Kind == "bridge".

type BridgeSlave

type BridgeSlave struct {
	// MasterName indicates master link for enslaved bridged interfaces.
	MasterName string `yaml:"masterName,omitempty" protobuf:"1"`
}

BridgeSlave contains the name of the master bridge of a bridged interface

type BridgeVLANSpec added in v1.8.0

type BridgeVLANSpec struct {
	FilteringEnabled bool `yaml:"filteringEnabled" protobuf:"1"`
}

BridgeVLANSpec describes VLAN settings of a bridge.

type ClientIdentifierSpec added in v1.12.0

type ClientIdentifierSpec struct {
	ClientIdentifier nethelpers.ClientIdentifier `yaml:"clientIdentifier" protobuf:"1"`
	DUIDRawHex       string                      `yaml:"duidRawHex,omitempty" protobuf:"2"`
}

ClientIdentifierSpec is a shared DHCP4/DHCP6 client identifier spec.

type ConfigLayer

type ConfigLayer int

ConfigLayer describes network configuration layers, with lowest priority first.

const (
	ConfigDefault              ConfigLayer = iota // default
	ConfigCmdline                                 // cmdline
	ConfigPlatform                                // platform
	ConfigOperator                                // operator
	ConfigMachineConfiguration                    // configuration
)

Configuration layers.

func ConfigLayerString

func ConfigLayerString(s string) (ConfigLayer, error)

ConfigLayerString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ConfigLayerValues

func ConfigLayerValues() []ConfigLayer

ConfigLayerValues returns all values of the enum

func (ConfigLayer) IsAConfigLayer

func (i ConfigLayer) IsAConfigLayer() bool

IsAConfigLayer returns "true" if the value is listed in the enum definition. "false" otherwise

func (ConfigLayer) MarshalText

func (i ConfigLayer) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for ConfigLayer

func (ConfigLayer) String

func (i ConfigLayer) String() string

func (*ConfigLayer) UnmarshalText

func (i *ConfigLayer) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for ConfigLayer

type DHCP4OperatorSpec

type DHCP4OperatorSpec struct {
	RouteMetric         uint32               `yaml:"routeMetric" protobuf:"1"`
	SkipHostnameRequest bool                 `yaml:"skipHostnameRequest,omitempty" protobuf:"2"`
	ClientIdentifier    ClientIdentifierSpec `yaml:"clientIdentifier,omitempty" protobuf:"3"`
}

DHCP4OperatorSpec describes DHCP4 operator options.

type DHCP6OperatorSpec

type DHCP6OperatorSpec struct {
	RouteMetric         uint32               `yaml:"routeMetric" protobuf:"2"`
	SkipHostnameRequest bool                 `yaml:"skipHostnameRequest,omitempty" protobuf:"3"`
	ClientIdentifier    ClientIdentifierSpec `yaml:"clientIdentifier,omitempty" protobuf:"4"`
}

DHCP6OperatorSpec describes DHCP6 operator options.

type DNSConn added in v1.9.0

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

DNSConn is a wrapper around a Proxy.

func NewDNSConn added in v1.9.0

func NewDNSConn(proxy Proxy) *DNSConn

NewDNSConn initializes a new DNSConn.

func (*DNSConn) Addr added in v1.9.0

func (u *DNSConn) Addr() string

Addr returns the address of the DNSConn.

func (*DNSConn) Close added in v1.10.0

func (u *DNSConn) Close()

Close stops the DNSConn.

func (*DNSConn) Fails added in v1.9.0

func (u *DNSConn) Fails() uint32

Fails returns the number of fails of the DNSConn.

func (*DNSConn) Healthcheck added in v1.9.0

func (u *DNSConn) Healthcheck()

Healthcheck kicks of a round of health checks for this DNSConn.

func (*DNSConn) NewRef added in v1.10.0

func (u *DNSConn) NewRef() *DNSConn

NewRef returns a new reference to the DNSConn.

func (*DNSConn) Proxy added in v1.9.0

func (u *DNSConn) Proxy() Proxy

Proxy returns the Proxy field of the DNSConn.

type DNSResolveCache added in v1.7.0

DNSResolveCache resource holds DNS resolver info.

func NewDNSResolveCache added in v1.7.0

func NewDNSResolveCache(id resource.ID) *DNSResolveCache

NewDNSResolveCache initializes a DNSResolveCache resource.

type DNSResolveCacheExtension added in v1.7.0

type DNSResolveCacheExtension struct{}

DNSResolveCacheExtension provides auxiliary methods for DNSResolveCache.

func (DNSResolveCacheExtension) ResourceDefinition added in v1.7.0

ResourceDefinition implements typed.Extension interface.

type DNSResolveCacheSpec added in v1.7.0

type DNSResolveCacheSpec struct {
	Status string `yaml:"status" protobuf:"1"`
}

DNSResolveCacheSpec describes DNS servers status.

func (DNSResolveCacheSpec) DeepCopy added in v1.7.0

DeepCopy generates a deep copy of DNSResolveCacheSpec.

type DNSUpstream added in v1.7.0

DNSUpstream resource holds DNS resolver info.

func NewDNSUpstream added in v1.7.0

func NewDNSUpstream(id resource.ID) *DNSUpstream

NewDNSUpstream initializes a DNSUpstream resource.

type DNSUpstreamExtension added in v1.7.0

type DNSUpstreamExtension struct{}

DNSUpstreamExtension provides auxiliary methods for DNSUpstream.

func (DNSUpstreamExtension) ResourceDefinition added in v1.7.0

func (DNSUpstreamExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type DNSUpstreamSpec added in v1.7.0

type DNSUpstreamSpec = handle.ResourceSpec[DNSUpstreamSpecSpec]

DNSUpstreamSpec describes DNS upstreams status.

type DNSUpstreamSpecSpec added in v1.7.0

type DNSUpstreamSpecSpec struct {
	Conn *DNSConn
}

DNSUpstreamSpecSpec describes DNS upstreams status.

func (DNSUpstreamSpecSpec) MarshalYAML added in v1.7.0

func (d DNSUpstreamSpecSpec) MarshalYAML() (any, error)

MarshalYAML implements yaml.Marshaler interface.

type DeviceConfigSpec

DeviceConfigSpec resource holds network interface configs.

func NewDeviceConfig

func NewDeviceConfig(id resource.ID, device config.Device) *DeviceConfigSpec

NewDeviceConfig creates new interface config.

type DeviceConfigSpecExtension added in v1.4.0

type DeviceConfigSpecExtension struct{}

DeviceConfigSpecExtension providers auxiliary methods for DeviceConfigSpec.

func (DeviceConfigSpecExtension) ResourceDefinition added in v1.4.0

ResourceDefinition implements typed.Extension interface.

type DeviceConfigSpecSpec

type DeviceConfigSpecSpec struct {
	Device config.Device `protobuf:"1"`
}

DeviceConfigSpecSpec contains the spec of a device config.

func (DeviceConfigSpecSpec) DeepCopy

DeepCopy generates a deep copy of DeviceConfigSpecSpec.

func (*DeviceConfigSpecSpec) MarshalProto

func (spec *DeviceConfigSpecSpec) MarshalProto() ([]byte, error)

MarshalProto implements ProtoMarshaler.

func (*DeviceConfigSpecSpec) UnmarshalProto

func (spec *DeviceConfigSpecSpec) UnmarshalProto(protoBytes []byte) error

UnmarshalProto implements protobuf.ResourceUnmarshaler.

type EthernetChannelsSpec added in v1.10.0

type EthernetChannelsSpec struct {
	RX       *uint32 `yaml:"rx,omitempty" protobuf:"1"`
	TX       *uint32 `yaml:"tx,omitempty" protobuf:"2"`
	Other    *uint32 `yaml:"other,omitempty" protobuf:"3"`
	Combined *uint32 `yaml:"combined,omitempty" protobuf:"4"`
}

EthernetChannelsSpec describes config of Ethernet channels.

type EthernetChannelsStatus added in v1.10.0

type EthernetChannelsStatus struct {
	// Read-only settings.
	RXMax       *uint32 `yaml:"rx-max,omitempty" protobuf:"1"`
	TXMax       *uint32 `yaml:"tx-max,omitempty" protobuf:"2"`
	OtherMax    *uint32 `yaml:"other-max,omitempty" protobuf:"3"`
	CombinedMax *uint32 `yaml:"combined-max,omitempty" protobuf:"4"`

	// Current settings (read-write).
	RX       *uint32 `yaml:"rx,omitempty" protobuf:"5"`
	TX       *uint32 `yaml:"tx,omitempty" protobuf:"6"`
	Other    *uint32 `yaml:"other,omitempty" protobuf:"7"`
	Combined *uint32 `yaml:"combined,omitempty" protobuf:"8"`
}

EthernetChannelsStatus describes status of Ethernet channels.

type EthernetFeatureStatus added in v1.10.0

type EthernetFeatureStatus struct {
	Name   string `yaml:"name" protobuf:"1"`
	Status string `yaml:"status" protobuf:"2"`
}

EthernetFeatureStatus describes status of Ethernet features.

type EthernetFeatureStatusList added in v1.10.0

type EthernetFeatureStatusList []EthernetFeatureStatus

EthernetFeatureStatusList is a list of EthernetFeatureStatus.

func (EthernetFeatureStatusList) MarshalYAML added in v1.10.0

func (l EthernetFeatureStatusList) MarshalYAML() (any, error)

MarshalYAML implements yaml.Marshaler interface.

type EthernetRingsSpec added in v1.10.0

type EthernetRingsSpec struct {
	RX           *uint32 `yaml:"rx,omitempty" protobuf:"1"`
	TX           *uint32 `yaml:"tx,omitempty" protobuf:"4"`
	RXMini       *uint32 `yaml:"rx-mini,omitempty" protobuf:"2"`
	RXJumbo      *uint32 `yaml:"rx-jumbo,omitempty" protobuf:"3"`
	RXBufLen     *uint32 `yaml:"rx-buf-len,omitempty" protobuf:"5"`
	CQESize      *uint32 `yaml:"cqe-size,omitempty" protobuf:"6"`
	TXPush       *bool   `yaml:"tx-push,omitempty" protobuf:"7"`
	RXPush       *bool   `yaml:"rx-push,omitempty" protobuf:"8"`
	TXPushBufLen *uint32 `yaml:"tx-push-buf-len,omitempty" protobuf:"9"`
	TCPDataSplit *bool   `yaml:"tcp-data-split,omitempty" protobuf:"10"`
}

EthernetRingsSpec describes config of Ethernet rings.

type EthernetRingsStatus added in v1.10.0

type EthernetRingsStatus struct {
	// Read-only settings.
	RXMax           *uint32 `yaml:"rx-max,omitempty" protobuf:"1"`
	RXMiniMax       *uint32 `yaml:"rx-mini-max,omitempty" protobuf:"2"`
	RXJumboMax      *uint32 `yaml:"rx-jumbo-max,omitempty" protobuf:"3"`
	TXMax           *uint32 `yaml:"tx-max,omitempty" protobuf:"4"`
	TXPushBufLenMax *uint32 `yaml:"tx-push-buf-len-max,omitempty" protobuf:"5"`

	// Current settings (read-write).
	RX           *uint32 `yaml:"rx,omitempty" protobuf:"6"`
	RXMini       *uint32 `yaml:"rx-mini,omitempty" protobuf:"7"`
	RXJumbo      *uint32 `yaml:"rx-jumbo,omitempty" protobuf:"8"`
	TX           *uint32 `yaml:"tx,omitempty" protobuf:"9"`
	RXBufLen     *uint32 `yaml:"rx-buf-len,omitempty" protobuf:"10"`
	CQESize      *uint32 `yaml:"cqe-size,omitempty" protobuf:"11"`
	TXPush       *bool   `yaml:"tx-push,omitempty" protobuf:"12"`
	RXPush       *bool   `yaml:"rx-push,omitempty" protobuf:"13"`
	TXPushBufLen *uint32 `yaml:"tx-push-buf-len,omitempty" protobuf:"14"`
	TCPDataSplit *bool   `yaml:"tcp-data-split,omitempty" protobuf:"15"`
}

EthernetRingsStatus describes status of Ethernet rings.

type EthernetSpec added in v1.10.0

EthernetSpec resource holds Ethernet network link status.

func NewEthernetSpec added in v1.10.0

func NewEthernetSpec(namespace resource.Namespace, id resource.ID) *EthernetSpec

NewEthernetSpec initializes a EthernetSpec resource.

type EthernetSpecExtension added in v1.10.0

type EthernetSpecExtension struct{}

EthernetSpecExtension provides auxiliary methods for EthernetSpec.

func (EthernetSpecExtension) ResourceDefinition added in v1.10.0

func (EthernetSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type EthernetSpecSpec added in v1.10.0

type EthernetSpecSpec struct {
	Rings     EthernetRingsSpec    `yaml:"rings,omitempty" protobuf:"1"`
	Features  map[string]bool      `yaml:"features,omitempty" protobuf:"2"`
	Channels  EthernetChannelsSpec `yaml:"channels,omitempty" protobuf:"3"`
	WakeOnLAN []nethelpers.WOLMode `yaml:"wakeOnLan,omitempty" protobuf:"4"`
}

EthernetSpecSpec describes config of Ethernet link.

func (EthernetSpecSpec) DeepCopy added in v1.10.0

func (o EthernetSpecSpec) DeepCopy() EthernetSpecSpec

DeepCopy generates a deep copy of EthernetSpecSpec.

type EthernetStatus added in v1.10.0

EthernetStatus resource holds Ethernet network link status.

func NewEthernetStatus added in v1.10.0

func NewEthernetStatus(namespace resource.Namespace, id resource.ID) *EthernetStatus

NewEthernetStatus initializes a EthernetStatus resource.

type EthernetStatusExtension added in v1.10.0

type EthernetStatusExtension struct{}

EthernetStatusExtension provides auxiliary methods for EthernetStatus.

func (EthernetStatusExtension) ResourceDefinition added in v1.10.0

ResourceDefinition implements typed.Extension interface.

type EthernetStatusSpec added in v1.10.0

type EthernetStatusSpec struct {
	LinkState     *bool                     `yaml:"linkState,omitempty" protobuf:"1"`
	SpeedMegabits int                       `yaml:"speedMbit,omitempty" protobuf:"2"`
	Port          nethelpers.Port           `yaml:"port" protobuf:"3"`
	Duplex        nethelpers.Duplex         `yaml:"duplex" protobuf:"4"`
	OurModes      []string                  `yaml:"ourModes,omitempty" protobuf:"5"`
	PeerModes     []string                  `yaml:"peerModes,omitempty" protobuf:"6"`
	Rings         *EthernetRingsStatus      `yaml:"rings,omitempty" protobuf:"7"`
	Features      EthernetFeatureStatusList `yaml:"features,omitempty" protobuf:"8"`
	Channels      *EthernetChannelsStatus   `yaml:"channels,omitempty" protobuf:"9"`
	WakeOnLAN     []nethelpers.WOLMode      `yaml:"wakeOnLAN,omitempty" protobuf:"10"`
}

EthernetStatusSpec describes status of rendered secrets.

func (EthernetStatusSpec) DeepCopy added in v1.10.0

DeepCopy generates a deep copy of EthernetStatusSpec.

type HardwareAddr

HardwareAddr resource describes hardware address of the physical links.

func NewHardwareAddr

func NewHardwareAddr(namespace resource.Namespace, id resource.ID) *HardwareAddr

NewHardwareAddr initializes a HardwareAddr resource.

type HardwareAddrExtension added in v1.4.0

type HardwareAddrExtension struct{}

HardwareAddrExtension provides auxiliary methods for HardwareAddr.

func (HardwareAddrExtension) ResourceDefinition added in v1.4.0

func (HardwareAddrExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type HardwareAddrSpec

type HardwareAddrSpec struct {
	// Name defines link name
	Name string `yaml:"name" protobuf:"1"`

	// Hardware address
	HardwareAddr nethelpers.HardwareAddr `yaml:"hardwareAddr" protobuf:"2"`
}

HardwareAddrSpec describes spec for the link.

func (HardwareAddrSpec) DeepCopy

func (o HardwareAddrSpec) DeepCopy() HardwareAddrSpec

DeepCopy generates a deep copy of HardwareAddrSpec.

type HostDNSConfig added in v1.7.0

HostDNSConfig resource holds host DNS config.

func NewHostDNSConfig added in v1.7.0

func NewHostDNSConfig(id resource.ID) *HostDNSConfig

NewHostDNSConfig initializes a HostDNSConfig resource.

type HostDNSConfigExtension added in v1.7.0

type HostDNSConfigExtension struct{}

HostDNSConfigExtension provides auxiliary methods for HostDNSConfig.

func (HostDNSConfigExtension) ResourceDefinition added in v1.7.0

func (HostDNSConfigExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type HostDNSConfigSpec added in v1.7.0

type HostDNSConfigSpec struct {
	Enabled               bool             `yaml:"enabled" protobuf:"1"`
	ListenAddresses       []netip.AddrPort `yaml:"listenAddresses,omitempty" protobuf:"2"`
	ServiceHostDNSAddress netip.Addr       `yaml:"serviceHostDNSAddress,omitempty" protobuf:"3"`
	ResolveMemberNames    bool             `yaml:"resolveMemberNames,omitempty" protobuf:"4"`
}

HostDNSConfigSpec describes host DNS config.

func (HostDNSConfigSpec) DeepCopy added in v1.7.0

func (o HostDNSConfigSpec) DeepCopy() HostDNSConfigSpec

DeepCopy generates a deep copy of HostDNSConfigSpec.

type HostnameSpec

HostnameSpec resource holds node hostname.

func NewHostnameSpec

func NewHostnameSpec(namespace resource.Namespace, id resource.ID) *HostnameSpec

NewHostnameSpec initializes a HostnameSpec resource.

type HostnameSpecExtension added in v1.4.0

type HostnameSpecExtension struct{}

HostnameSpecExtension provides auxiliary methods for HostnameSpec.

func (HostnameSpecExtension) ResourceDefinition added in v1.4.0

func (HostnameSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type HostnameSpecSpec

type HostnameSpecSpec struct {
	Hostname    string      `yaml:"hostname" protobuf:"1"`
	Domainname  string      `yaml:"domainname" protobuf:"2"`
	ConfigLayer ConfigLayer `yaml:"layer" protobuf:"3"`
}

HostnameSpecSpec describes node hostname.

func (HostnameSpecSpec) DeepCopy

func (o HostnameSpecSpec) DeepCopy() HostnameSpecSpec

DeepCopy generates a deep copy of HostnameSpecSpec.

func (*HostnameSpecSpec) FQDN

func (spec *HostnameSpecSpec) FQDN() string

FQDN returns the fully-qualified domain name.

func (*HostnameSpecSpec) ParseFQDN

func (spec *HostnameSpecSpec) ParseFQDN(fqdn string) error

ParseFQDN into parts and validate it.

func (*HostnameSpecSpec) Validate

func (spec *HostnameSpecSpec) Validate() error

Validate the hostname.

type HostnameStatus

HostnameStatus resource holds node hostname.

func NewHostnameStatus

func NewHostnameStatus(namespace resource.Namespace, id resource.ID) *HostnameStatus

NewHostnameStatus initializes a HostnameStatus resource.

type HostnameStatusExtension added in v1.4.0

type HostnameStatusExtension struct{}

HostnameStatusExtension provides auxiliary methods for HostnameStatus.

func (HostnameStatusExtension) ResourceDefinition added in v1.4.0

ResourceDefinition implements typed.Extension interface.

type HostnameStatusSpec

type HostnameStatusSpec struct {
	Hostname   string `yaml:"hostname" protobuf:"1"`
	Domainname string `yaml:"domainname" protobuf:"2"`
}

HostnameStatusSpec describes node hostname.

func (*HostnameStatusSpec) DNSNames

func (spec *HostnameStatusSpec) DNSNames() []string

DNSNames returns DNS names to be added to the certificate based on the hostname and fqdn.

func (HostnameStatusSpec) DeepCopy

DeepCopy generates a deep copy of HostnameStatusSpec.

func (*HostnameStatusSpec) FQDN

func (spec *HostnameStatusSpec) FQDN() string

FQDN returns the fully-qualified domain name.

type LinkAliasSpec added in v1.12.0

LinkAliasSpec resource tells which link should have which alias (name).

If the link shouldn't have the alias, resource is removed.

func NewLinkAliasSpec added in v1.12.0

func NewLinkAliasSpec(namespace resource.Namespace, id resource.ID) *LinkAliasSpec

NewLinkAliasSpec initializes a LinkAliasSpec resource.

type LinkAliasSpecExtension added in v1.12.0

type LinkAliasSpecExtension struct{}

LinkAliasSpecExtension provides auxiliary methods for LinkAliasSpec.

func (LinkAliasSpecExtension) ResourceDefinition added in v1.12.0

func (LinkAliasSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type LinkAliasSpecSpec added in v1.12.0

type LinkAliasSpecSpec struct {
	Alias string `yaml:"alias" protobuf:"1"`
}

LinkAliasSpecSpec describes status of rendered secrets.

func (LinkAliasSpecSpec) DeepCopy added in v1.12.0

func (o LinkAliasSpecSpec) DeepCopy() LinkAliasSpecSpec

DeepCopy generates a deep copy of LinkAliasSpecSpec.

type LinkRefresh

LinkRefresh resource is used to communicate link changes which can't be subscribed to via netlink.

The only usecase for now is the Wireguards, as there's no way subscribe to wireguard updates via the netlink API.

Whenever Wireguard interface is updated, LinkRefresh resource is modified to trigger a reconcile loop in the LinkStatusController.

func NewLinkRefresh

func NewLinkRefresh(namespace resource.Namespace, id resource.ID) *LinkRefresh

NewLinkRefresh initializes a LinkRefresh resource.

type LinkRefreshExtension added in v1.4.0

type LinkRefreshExtension struct{}

LinkRefreshExtension provides auxiliary methods for LinkRefresh.

func (LinkRefreshExtension) ResourceDefinition added in v1.4.0

func (LinkRefreshExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type LinkRefreshSpec

type LinkRefreshSpec struct {
	Generation int `yaml:"generation" protobuf:"1"`
}

LinkRefreshSpec describes status of rendered secrets.

func (*LinkRefreshSpec) Bump

func (s *LinkRefreshSpec) Bump()

Bump performs an update.

func (LinkRefreshSpec) DeepCopy

func (o LinkRefreshSpec) DeepCopy() LinkRefreshSpec

DeepCopy generates a deep copy of LinkRefreshSpec.

type LinkResolver added in v1.10.0

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

LinkResolver resolves link names and aliases to actual link names.

func NewEmptyLinkResolver added in v1.10.0

func NewEmptyLinkResolver() *LinkResolver

NewEmptyLinkResolver creates a new link name resolver with an empty lookup table.

func NewLinkResolver added in v1.10.0

func NewLinkResolver(f func() iter.Seq[*LinkStatus]) *LinkResolver

NewLinkResolver creates a new link name resolver.

func (*LinkResolver) Resolve added in v1.10.0

func (r *LinkResolver) Resolve(name string) string

Resolve resolves the link name or alias to the actual link name.

If the link name or alias is not found in the lookup table, it is returned as is.

type LinkSpec

LinkSpec resource describes desired state of the link (network interface).

func NewLinkSpec

func NewLinkSpec(namespace resource.Namespace, id resource.ID) *LinkSpec

NewLinkSpec initializes a LinkSpec resource.

type LinkSpecExtension added in v1.4.0

type LinkSpecExtension struct{}

LinkSpecExtension provides auxiliary methods for LinkSpec.

func (LinkSpecExtension) ResourceDefinition added in v1.4.0

func (LinkSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type LinkSpecSpec

type LinkSpecSpec struct {
	// Name defines link name
	Name string `yaml:"name" protobuf:"1"`

	// Logical describes if the interface should be created on the fly if it doesn't exist.
	Logical bool `yaml:"logical" protobuf:"2"`

	// If Up is true, bring interface up, otherwise bring interface down.
	//
	// TODO: make *bool ?
	Up bool `yaml:"up" protobuf:"3"`

	// Interface MTU (always applies).
	MTU uint32 `yaml:"mtu" protobuf:"4"`

	// Kind and Type are only required for Logical interfaces.
	Kind string              `yaml:"kind" protobuf:"5"`
	Type nethelpers.LinkType `yaml:"type" protobuf:"6"`

	// Override hardware (MAC) address (if supported).
	HardwareAddress nethelpers.HardwareAddr `yaml:"hardwareAddr,omitempty" protobuf:"15"`

	// ParentName indicates link parent for VLAN interfaces.
	ParentName string `yaml:"parentName,omitempty" protobuf:"7"`

	// MasterName indicates master link for enslaved bonded interfaces.
	BondSlave BondSlave `yaml:",omitempty,inline" protobuf:"8"`

	// BridgeSlave indicates master link for bridged interfaces.
	BridgeSlave BridgeSlave `yaml:"bridgeSlave,omitempty" protobuf:"9"`

	// These structures are present depending on "Kind" for Logical interfaces.
	VLAN         VLANSpec         `yaml:"vlan,omitempty" protobuf:"10"`
	BondMaster   BondMasterSpec   `yaml:"bondMaster,omitempty" protobuf:"11"`
	BridgeMaster BridgeMasterSpec `yaml:"bridgeMaster,omitempty" protobuf:"12"`
	Wireguard    WireguardSpec    `yaml:"wireguard,omitempty" protobuf:"13"`

	// Configuration layer.
	ConfigLayer ConfigLayer `yaml:"layer" protobuf:"14"`

	// Multicast indicates whether the multicast flag should be set on the interface to the value.
	Multicast *bool `yaml:"multicast,omitempty" protobuf:"16"`
}

LinkSpecSpec describes spec for the link.

func (LinkSpecSpec) DeepCopy

func (o LinkSpecSpec) DeepCopy() LinkSpecSpec

DeepCopy generates a deep copy of LinkSpecSpec.

func (*LinkSpecSpec) Merge

func (spec *LinkSpecSpec) Merge(other *LinkSpecSpec) error

Merge with other, overwriting fields from other if set.

type LinkStatus

LinkStatus resource holds physical network link status.

func NewLinkStatus

func NewLinkStatus(namespace resource.Namespace, id resource.ID) *LinkStatus

NewLinkStatus initializes a LinkStatus resource.

type LinkStatusExtension added in v1.4.0

type LinkStatusExtension struct{}

LinkStatusExtension provides auxiliary methods for LinkStatus.

func (LinkStatusExtension) ResourceDefinition added in v1.4.0

func (LinkStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type LinkStatusSpec

type LinkStatusSpec struct {
	// Fields coming from rtnetlink API.
	Alias            string                      `yaml:"alias,omitempty" protobuf:"31"`
	AltNames         []string                    `yaml:"altNames,omitempty" protobuf:"32"`
	Index            uint32                      `yaml:"index" protobuf:"1"`
	Type             nethelpers.LinkType         `yaml:"type" protobuf:"2"`
	LinkIndex        uint32                      `yaml:"linkIndex" protobuf:"3"`
	Flags            nethelpers.LinkFlags        `yaml:"flags" protobuf:"4"`
	HardwareAddr     nethelpers.HardwareAddr     `yaml:"hardwareAddr" protobuf:"5"`
	PermanentAddr    nethelpers.HardwareAddr     `yaml:"permanentAddr" protobuf:"30"`
	BroadcastAddr    nethelpers.HardwareAddr     `yaml:"broadcastAddr" protobuf:"6"`
	MTU              uint32                      `yaml:"mtu" protobuf:"7"`
	QueueDisc        string                      `yaml:"queueDisc" protobuf:"8"`
	MasterIndex      uint32                      `yaml:"masterIndex,omitempty" protobuf:"9"`
	OperationalState nethelpers.OperationalState `yaml:"operationalState" protobuf:"10"`
	Kind             string                      `yaml:"kind" protobuf:"11"`
	SlaveKind        string                      `yaml:"slaveKind" protobuf:"12"`
	BusPath          string                      `yaml:"busPath,omitempty" protobuf:"13"`
	PCIID            string                      `yaml:"pciID,omitempty" protobuf:"14"`
	Driver           string                      `yaml:"driver,omitempty" protobuf:"15"`
	DriverVersion    string                      `yaml:"driverVersion,omitempty" protobuf:"16"`
	FirmwareVersion  string                      `yaml:"firmwareVersion,omitempty" protobuf:"17"`
	ProductID        string                      `yaml:"productID,omitempty" protobuf:"18"`
	VendorID         string                      `yaml:"vendorID,omitempty" protobuf:"19"`
	Product          string                      `yaml:"product,omitempty" protobuf:"20"`
	Vendor           string                      `yaml:"vendor,omitempty" protobuf:"21"`
	// Fields coming from ethtool API.
	LinkState     bool              `yaml:"linkState" protobuf:"22"`
	SpeedMegabits int               `yaml:"speedMbit,omitempty" protobuf:"23"`
	Port          nethelpers.Port   `yaml:"port" protobuf:"24"`
	Duplex        nethelpers.Duplex `yaml:"duplex" protobuf:"25"`
	// Following fields are only populated with respective Kind.
	VLAN         VLANSpec         `yaml:"vlan,omitempty" protobuf:"26"`
	BridgeMaster BridgeMasterSpec `yaml:"bridgeMaster,omitempty" protobuf:"27"`
	BondMaster   BondMasterSpec   `yaml:"bondMaster,omitempty" protobuf:"28"`
	Wireguard    WireguardSpec    `yaml:"wireguard,omitempty" protobuf:"29"`
}

LinkStatusSpec describes status of rendered secrets.

func (LinkStatusSpec) DeepCopy

func (o LinkStatusSpec) DeepCopy() LinkStatusSpec

DeepCopy generates a deep copy of LinkStatusSpec.

func (LinkStatusSpec) Physical

func (s LinkStatusSpec) Physical() bool

Physical checks if the link is physical ethernet.

type NfTablesAddressMatch added in v1.6.0

type NfTablesAddressMatch struct {
	IncludeSubnets []netip.Prefix `yaml:"includeSubnets,omitempty" protobuf:"1"`
	ExcludeSubnets []netip.Prefix `yaml:"excludeSubnets,omitempty" protobuf:"2"`
	Invert         bool           `yaml:"invert,omitempty" protobuf:"3"`
}

NfTablesAddressMatch describes the match on the IP address.

type NfTablesChain added in v1.6.0

NfTablesChain resource holds definition of the nftables chain.

func NewNfTablesChain added in v1.6.0

func NewNfTablesChain(namespace resource.Namespace, id resource.ID) *NfTablesChain

NewNfTablesChain initializes a NfTablesChain resource.

type NfTablesChainExtension added in v1.6.0

type NfTablesChainExtension struct{}

NfTablesChainExtension provides auxiliary methods for NfTablesChain.

func (NfTablesChainExtension) ResourceDefinition added in v1.6.0

func (NfTablesChainExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type NfTablesChainSpec added in v1.6.0

type NfTablesChainSpec struct {
	Type     nethelpers.NfTablesChainType     `yaml:"type" protobuf:"1"`
	Hook     nethelpers.NfTablesChainHook     `yaml:"hook" protobuf:"2"`
	Priority nethelpers.NfTablesChainPriority `yaml:"priority" protobuf:"3"`
	Policy   nethelpers.NfTablesVerdict       `yaml:"policy" protobuf:"5"`

	Rules []NfTablesRule `yaml:"rules" protobuf:"4"`
}

NfTablesChainSpec describes status of rendered secrets.

func (NfTablesChainSpec) DeepCopy added in v1.6.0

func (o NfTablesChainSpec) DeepCopy() NfTablesChainSpec

DeepCopy generates a deep copy of NfTablesChainSpec.

type NfTablesClampMSS added in v1.6.0

type NfTablesClampMSS struct {
	MTU uint16 `yaml:"mtu" protobuf:"1"`
}

NfTablesClampMSS describes the TCP MSS clamping operation.

MSS is limited by the `MaxMTU` so that: - IPv4: MSS = MaxMTU - 40 - IPv6: MSS = MaxMTU - 60.

type NfTablesConntrackStateMatch added in v1.6.0

type NfTablesConntrackStateMatch struct {
	States []nethelpers.ConntrackState `yaml:"states" protobuf:"1"`
}

NfTablesConntrackStateMatch describes the match on the connection tracking state.

type NfTablesICMPTypeMatch added in v1.11.0

type NfTablesICMPTypeMatch struct {
	Types []nethelpers.ICMPType `yaml:"types" protobuf:"1"`
}

NfTablesICMPTypeMatch describes the match on the ICMP type.

type NfTablesIfNameMatch added in v1.6.0

type NfTablesIfNameMatch struct {
	InterfaceNames []string                 `yaml:"interfaceName" protobuf:"3"`
	Operator       nethelpers.MatchOperator `yaml:"operator" protobuf:"2"`
}

NfTablesIfNameMatch describes the match on the interface name.

type NfTablesLayer4Match added in v1.6.0

type NfTablesLayer4Match struct {
	Protocol             nethelpers.Protocol    `yaml:"protocol" protobuf:"1"`
	MatchSourcePort      *NfTablesPortMatch     `yaml:"matchSourcePort,omitempty" protobuf:"2"`
	MatchDestinationPort *NfTablesPortMatch     `yaml:"matchDestinationPort,omitempty" protobuf:"3"`
	MatchICMPType        *NfTablesICMPTypeMatch `yaml:"matchICMPType,omitempty" protobuf:"4"`
}

NfTablesLayer4Match describes the match on the transport layer protocol.

type NfTablesLimitMatch added in v1.6.0

type NfTablesLimitMatch struct {
	PacketRatePerSecond uint64 `yaml:"packetRatePerSecond" protobuf:"1"`
}

NfTablesLimitMatch describes the match on the packet rate.

type NfTablesMark added in v1.6.0

type NfTablesMark struct {
	Mask  uint32 `yaml:"mask,omitempty" protobuf:"1"`
	Xor   uint32 `yaml:"xor,omitempty" protobuf:"2"`
	Value uint32 `yaml:"value,omitempty" protobuf:"3"`
}

NfTablesMark encodes packet mark match/update operation.

When used as a match computes the following condition: (mark & mask) ^ xor == value

When used as an update computes the following operation: mark = (mark & mask) ^ xor.

type NfTablesPortMatch added in v1.6.0

type NfTablesPortMatch struct {
	Ranges []PortRange `yaml:"ranges,omitempty" protobuf:"1"`
}

NfTablesPortMatch describes the match on the transport layer port.

type NfTablesRule added in v1.6.0

type NfTablesRule struct {
	MatchIIfName            *NfTablesIfNameMatch         `yaml:"matchIIfName,omitempty" protobuf:"8"`
	MatchOIfName            *NfTablesIfNameMatch         `yaml:"matchOIfName,omitempty" protobuf:"1"`
	MatchMark               *NfTablesMark                `yaml:"matchMark,omitempty" protobuf:"3"`
	MatchConntrackState     *NfTablesConntrackStateMatch `yaml:"matchConntrackState,omitempty" protobuf:"11"`
	MatchSourceAddress      *NfTablesAddressMatch        `yaml:"matchSourceAddress,omitempty" protobuf:"5"`
	MatchDestinationAddress *NfTablesAddressMatch        `yaml:"matchDestinationAddress,omitempty" protobuf:"6"`
	MatchLayer4             *NfTablesLayer4Match         `yaml:"matchLayer4,omitempty" protobuf:"7"`
	MatchLimit              *NfTablesLimitMatch          `yaml:"matchLimit,omitempty" protobuf:"10"`

	ClampMSS    *NfTablesClampMSS           `yaml:"clampMSS,omitempty" protobuf:"9"`
	SetMark     *NfTablesMark               `yaml:"setMark,omitempty" protobuf:"4"`
	AnonCounter bool                        `yaml:"anonymousCounter,omitempty" protobuf:"12"`
	Verdict     *nethelpers.NfTablesVerdict `yaml:"verdict,omitempty" protobuf:"2"`
}

NfTablesRule describes a single rule in the nftables chain.

type NodeAddress

NodeAddress resource holds physical network link status.

func NewNodeAddress

func NewNodeAddress(namespace resource.Namespace, id resource.ID) *NodeAddress

NewNodeAddress initializes a NodeAddress resource.

type NodeAddressExtension added in v1.4.0

type NodeAddressExtension struct{}

NodeAddressExtension provides auxiliary methods for NodeAddress.

func (NodeAddressExtension) ResourceDefinition added in v1.4.0

func (NodeAddressExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type NodeAddressFilter

NodeAddressFilter resource holds filter for NodeAddress resources.

func NewNodeAddressFilter

func NewNodeAddressFilter(namespace resource.Namespace, id resource.ID) *NodeAddressFilter

NewNodeAddressFilter initializes a NodeAddressFilter resource.

type NodeAddressFilterExtension added in v1.4.0

type NodeAddressFilterExtension struct{}

NodeAddressFilterExtension provides auxiliary methods for NodeAddressFilter.

func (NodeAddressFilterExtension) ResourceDefinition added in v1.4.0

ResourceDefinition implements typed.Extension interface.

type NodeAddressFilterSpec

type NodeAddressFilterSpec struct {
	// Address is skipped if it doesn't match any of the includeSubnets (if includeSubnets is not empty).
	IncludeSubnets []netip.Prefix `yaml:"includeSubnets" protobuf:"1"`
	// Address is skipped if it matches any of the includeSubnets.
	ExcludeSubnets []netip.Prefix `yaml:"excludeSubnets" protobuf:"2"`
}

NodeAddressFilterSpec describes a filter for NodeAddresses.

func (NodeAddressFilterSpec) DeepCopy

DeepCopy generates a deep copy of NodeAddressFilterSpec.

type NodeAddressSortAlgorithm added in v1.9.0

NodeAddressSortAlgorithm resource holds filter for NodeAddress resources.

func NewNodeAddressSortAlgorithm added in v1.9.0

func NewNodeAddressSortAlgorithm(namespace resource.Namespace, id resource.ID) *NodeAddressSortAlgorithm

NewNodeAddressSortAlgorithm initializes a NodeAddressSortAlgorithm resource.

type NodeAddressSortAlgorithmExtension added in v1.9.0

type NodeAddressSortAlgorithmExtension struct{}

NodeAddressSortAlgorithmExtension provides auxiliary methods for NodeAddressSortAlgorithm.

func (NodeAddressSortAlgorithmExtension) ResourceDefinition added in v1.9.0

ResourceDefinition implements typed.Extension interface.

type NodeAddressSortAlgorithmSpec added in v1.9.0

type NodeAddressSortAlgorithmSpec struct {
	Algorithm nethelpers.AddressSortAlgorithm `yaml:"algorithm" protobuf:"1"`
}

NodeAddressSortAlgorithmSpec describes a filter for NodeAddresses.

func (NodeAddressSortAlgorithmSpec) DeepCopy added in v1.9.0

DeepCopy generates a deep copy of NodeAddressSortAlgorithmSpec.

type NodeAddressSpec

type NodeAddressSpec struct {
	Addresses     []netip.Prefix                  `yaml:"addresses" protobuf:"1"`
	SortAlgorithm nethelpers.AddressSortAlgorithm `yaml:"sortAlgorithm" protobuf:"2"`
}

NodeAddressSpec describes a set of node addresses.

func (NodeAddressSpec) DeepCopy

func (o NodeAddressSpec) DeepCopy() NodeAddressSpec

DeepCopy generates a deep copy of NodeAddressSpec.

func (*NodeAddressSpec) IPs

func (spec *NodeAddressSpec) IPs() []netip.Addr

IPs returns IP without prefix.

type Operator

type Operator int

Operator enumerates Talos network operators.

const (
	OperatorDHCP4 Operator = iota // dhcp4
	OperatorDHCP6                 // dhcp6
	OperatorVIP                   // vip
)

Operator list.

func OperatorString

func OperatorString(s string) (Operator, error)

OperatorString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OperatorValues

func OperatorValues() []Operator

OperatorValues returns all values of the enum

func (Operator) IsAOperator

func (i Operator) IsAOperator() bool

IsAOperator returns "true" if the value is listed in the enum definition. "false" otherwise

func (Operator) MarshalText

func (i Operator) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for Operator

func (Operator) String

func (i Operator) String() string

func (*Operator) UnmarshalText

func (i *Operator) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Operator

type OperatorSpec

OperatorSpec resource holds operator specification.

func NewOperatorSpec

func NewOperatorSpec(namespace resource.Namespace, id resource.ID) *OperatorSpec

NewOperatorSpec initializes a OperatorSpec resource.

type OperatorSpecExtension added in v1.4.0

type OperatorSpecExtension struct{}

OperatorSpecExtension provides auxiliary methods for OperatorSpec.

func (OperatorSpecExtension) ResourceDefinition added in v1.4.0

func (OperatorSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type OperatorSpecSpec

type OperatorSpecSpec struct {
	Operator  Operator `yaml:"operator" protobuf:"1"`
	LinkName  string   `yaml:"linkName" protobuf:"2"`
	RequireUp bool     `yaml:"requireUp" protobuf:"3"`

	DHCP4 DHCP4OperatorSpec `yaml:"dhcp4,omitempty" protobuf:"4"`
	DHCP6 DHCP6OperatorSpec `yaml:"dhcp6,omitempty" protobuf:"5"`
	VIP   VIPOperatorSpec   `yaml:"vip,omitempty" protobuf:"6"`

	ConfigLayer ConfigLayer `yaml:"layer" protobuf:"7"`
}

OperatorSpecSpec describes operator specification.

func (OperatorSpecSpec) DeepCopy

func (o OperatorSpecSpec) DeepCopy() OperatorSpecSpec

DeepCopy generates a deep copy of OperatorSpecSpec.

func (OperatorSpecSpec) Equal added in v1.4.0

func (spec OperatorSpecSpec) Equal(other OperatorSpecSpec) bool

Equal implements equality check for OperatorSpecSpec.

type PlatformConfig added in v1.12.0

PlatformConfig resource holds DNS resolver info.

func NewPlatformConfig added in v1.12.0

func NewPlatformConfig(namespace resource.Namespace, id resource.ID) *PlatformConfig

NewPlatformConfig initializes a PlatformConfig resource.

type PlatformConfigExtension added in v1.12.0

type PlatformConfigExtension struct{}

PlatformConfigExtension provides auxiliary methods for PlatformConfig.

func (PlatformConfigExtension) ResourceDefinition added in v1.12.0

ResourceDefinition implements typed.Extension interface.

type PlatformConfigSpec added in v1.12.0

type PlatformConfigSpec struct {
	Addresses []AddressSpecSpec `yaml:"addresses" protobuf:"1"`
	Links     []LinkSpecSpec    `yaml:"links" protobuf:"2"`
	Routes    []RouteSpecSpec   `yaml:"routes" protobuf:"3"`

	Hostnames   []HostnameSpecSpec   `yaml:"hostnames" protobuf:"4"`
	Resolvers   []ResolverSpecSpec   `yaml:"resolvers" protobuf:"5"`
	TimeServers []TimeServerSpecSpec `yaml:"timeServers" protobuf:"6"`

	Operators []OperatorSpecSpec `yaml:"operators" protobuf:"7"`

	ExternalIPs []netip.Addr `yaml:"externalIPs" protobuf:"8"`

	Probes []ProbeSpecSpec `yaml:"probes,omitempty" protobuf:"9"`

	Metadata *runtime.PlatformMetadataSpec `yaml:"metadata,omitempty" protobuf:"10"`
}

PlatformConfigSpec describes platform network configuration.

This structure is marshaled to STATE partition to persist cached network configuration across reboots.

func (PlatformConfigSpec) DeepCopy added in v1.12.0

DeepCopy generates a deep copy of PlatformConfigSpec.

func (*PlatformConfigSpec) Equal added in v1.12.0

func (p *PlatformConfigSpec) Equal(other *PlatformConfigSpec) bool

Equal compares two platform network configurations.

type PortRange added in v1.6.0

type PortRange struct {
	Lo uint16 `yaml:"lo" protobuf:"1"`
	Hi uint16 `yaml:"hi" protobuf:"2"`
}

PortRange describes a range of ports.

Range is [lo, hi].

type ProbeSpec added in v1.4.0

ProbeSpec resource holds Probe specification to be run.

func NewProbeSpec added in v1.4.0

func NewProbeSpec(namespace resource.Namespace, id resource.ID) *ProbeSpec

NewProbeSpec initializes a ProbeSpec resource.

type ProbeSpecExtension added in v1.4.0

type ProbeSpecExtension struct{}

ProbeSpecExtension provides auxiliary methods for ProbeSpec.

func (ProbeSpecExtension) ResourceDefinition added in v1.4.0

func (ProbeSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type ProbeSpecSpec added in v1.4.0

type ProbeSpecSpec struct {
	// Interval between the probes.
	Interval time.Duration `yaml:"interval" protobuf:"1"`
	// FailureThreshold is the number of consecutive failures for the probe to be considered failed after having succeeded.
	FailureThreshold int `yaml:"failureThreshold" protobuf:"2"`
	// One of the probe types should be specified, for now it's only TCP.
	TCP TCPProbeSpec `yaml:"tcp,omitempty" protobuf:"3"`
	// Configuration layer.
	ConfigLayer ConfigLayer `yaml:"layer" protobuf:"4"`
}

ProbeSpecSpec describes the Probe.

func (ProbeSpecSpec) DeepCopy added in v1.4.0

func (o ProbeSpecSpec) DeepCopy() ProbeSpecSpec

DeepCopy generates a deep copy of ProbeSpecSpec.

func (ProbeSpecSpec) Equal added in v1.4.0

func (spec ProbeSpecSpec) Equal(other ProbeSpecSpec) bool

Equal returns true if the specs are equal.

func (*ProbeSpecSpec) ID added in v1.4.0

func (spec *ProbeSpecSpec) ID() (resource.ID, error)

ID returns the ID of the resource based on the spec.

type ProbeStatus added in v1.4.0

ProbeStatus resource holds Probe result.

func NewProbeStatus added in v1.4.0

func NewProbeStatus(namespace resource.Namespace, id resource.ID) *ProbeStatus

NewProbeStatus initializes a ProbeStatus resource.

type ProbeStatusExtension added in v1.4.0

type ProbeStatusExtension struct{}

ProbeStatusExtension provides auxiliary methods for ProbeStatus.

func (ProbeStatusExtension) ResourceDefinition added in v1.4.0

func (ProbeStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type ProbeStatusSpec added in v1.4.0

type ProbeStatusSpec struct {
	// Success of the check.
	Success bool `yaml:"success" protobuf:"1"`
	// Last error of the probe.
	LastError string `yaml:"lastError" protobuf:"2"`
}

ProbeStatusSpec describes the Probe.

func (ProbeStatusSpec) DeepCopy added in v1.4.0

func (o ProbeStatusSpec) DeepCopy() ProbeStatusSpec

DeepCopy generates a deep copy of ProbeStatusSpec.

type Proxy added in v1.7.0

type Proxy interface {
	Addr() string
	Fails() uint32
	Healthcheck()
	Close()
	Start(time.Duration)
}

Proxy is essentially a proxy.Proxy interface. It's here because we don't want machinery to depend on coredns. The good thing we don't need any additional methods from coredns, so we can use a simple interface.

type ReadyCondition

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

ReadyCondition implements condition which waits for the network to be ready.

func NewReadyCondition

func NewReadyCondition(state state.State, checks ...StatusCheck) *ReadyCondition

NewReadyCondition builds a condition which waits for the network to be ready.

func (*ReadyCondition) String

func (condition *ReadyCondition) String() string

func (*ReadyCondition) Wait

func (condition *ReadyCondition) Wait(ctx context.Context) error

Wait implements condition interface.

type ResolverSpec

ResolverSpec resource holds DNS resolver info.

func NewResolverSpec

func NewResolverSpec(namespace resource.Namespace, id resource.ID) *ResolverSpec

NewResolverSpec initializes a ResolverSpec resource.

type ResolverSpecExtension added in v1.4.0

type ResolverSpecExtension struct{}

ResolverSpecExtension provides auxiliary methods for ResolverSpec.

func (ResolverSpecExtension) ResourceDefinition added in v1.4.0

func (ResolverSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type ResolverSpecSpec

type ResolverSpecSpec struct {
	DNSServers    []netip.Addr `yaml:"dnsServers" protobuf:"1"`
	ConfigLayer   ConfigLayer  `yaml:"layer" protobuf:"2"`
	SearchDomains []string     `yaml:"searchDomains,omitempty" protobuf:"3"`
}

ResolverSpecSpec describes DNS resolvers.

func (ResolverSpecSpec) DeepCopy

func (o ResolverSpecSpec) DeepCopy() ResolverSpecSpec

DeepCopy generates a deep copy of ResolverSpecSpec.

type ResolverStatus

ResolverStatus resource holds DNS resolver info.

func NewResolverStatus

func NewResolverStatus(namespace resource.Namespace, id resource.ID) *ResolverStatus

NewResolverStatus initializes a ResolverStatus resource.

type ResolverStatusExtension added in v1.4.0

type ResolverStatusExtension struct{}

ResolverStatusExtension provides auxiliary methods for ResolverStatus.

func (ResolverStatusExtension) ResourceDefinition added in v1.4.0

ResourceDefinition implements typed.Extension interface.

type ResolverStatusSpec

type ResolverStatusSpec struct {
	DNSServers    []netip.Addr `yaml:"dnsServers" protobuf:"1"`
	SearchDomains []string     `yaml:"searchDomains" protobuf:"2"`
}

ResolverStatusSpec describes DNS resolvers.

func (ResolverStatusSpec) DeepCopy

DeepCopy generates a deep copy of ResolverStatusSpec.

type RouteSpec

RouteSpec resource holds route specification to be applied to the kernel.

func NewRouteSpec

func NewRouteSpec(namespace resource.Namespace, id resource.ID) *RouteSpec

NewRouteSpec initializes a RouteSpec resource.

type RouteSpecExtension added in v1.4.0

type RouteSpecExtension struct{}

RouteSpecExtension provides auxiliary methods for RouteSpec.

func (RouteSpecExtension) ResourceDefinition added in v1.4.0

func (RouteSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type RouteSpecSpec

type RouteSpecSpec struct {
	Family      nethelpers.Family        `yaml:"family" protobuf:"1"`
	Destination netip.Prefix             `yaml:"dst" protobuf:"2"`
	Source      netip.Addr               `yaml:"src" protobuf:"3"`
	Gateway     netip.Addr               `yaml:"gateway" protobuf:"4"`
	OutLinkName string                   `yaml:"outLinkName,omitempty" protobuf:"5"`
	Table       nethelpers.RoutingTable  `yaml:"table" protobuf:"6"`
	Priority    uint32                   `yaml:"priority,omitempty" protobuf:"7"`
	Scope       nethelpers.Scope         `yaml:"scope" protobuf:"8"`
	Type        nethelpers.RouteType     `yaml:"type" protobuf:"9"`
	Flags       nethelpers.RouteFlags    `yaml:"flags" protobuf:"10"`
	Protocol    nethelpers.RouteProtocol `yaml:"protocol" protobuf:"11"`
	ConfigLayer ConfigLayer              `yaml:"layer" protobuf:"12"`
	MTU         uint32                   `yaml:"mtu,omitempty" protobuf:"13"`
}

RouteSpecSpec describes the route.

func (RouteSpecSpec) DeepCopy

func (o RouteSpecSpec) DeepCopy() RouteSpecSpec

DeepCopy generates a deep copy of RouteSpecSpec.

func (*RouteSpecSpec) Normalize

func (route *RouteSpecSpec) Normalize() nethelpers.Family

Normalize converts 0.0.0.0 to zero value.

type RouteStatus

RouteStatus resource holds physical network link status.

func NewRouteStatus

func NewRouteStatus(namespace resource.Namespace, id resource.ID) *RouteStatus

NewRouteStatus initializes a RouteStatus resource.

type RouteStatusExtension added in v1.4.0

type RouteStatusExtension struct{}

RouteStatusExtension provides auxiliary methods for RouteStatus.

func (RouteStatusExtension) ResourceDefinition added in v1.4.0

func (RouteStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type RouteStatusSpec

type RouteStatusSpec struct {
	Family       nethelpers.Family        `yaml:"family" protobuf:"1"`
	Destination  netip.Prefix             `yaml:"dst" protobuf:"2"`
	Source       netip.Addr               `yaml:"src" protobuf:"3"`
	Gateway      netip.Addr               `yaml:"gateway" protobuf:"4"`
	OutLinkIndex uint32                   `yaml:"outLinkIndex,omitempty" protobuf:"5"`
	OutLinkName  string                   `yaml:"outLinkName,omitempty" protobuf:"6"`
	Table        nethelpers.RoutingTable  `yaml:"table" protobuf:"7"`
	Priority     uint32                   `yaml:"priority" protobuf:"8"`
	Scope        nethelpers.Scope         `yaml:"scope" protobuf:"9"`
	Type         nethelpers.RouteType     `yaml:"type" protobuf:"10"`
	Flags        nethelpers.RouteFlags    `yaml:"flags" protobuf:"11"`
	Protocol     nethelpers.RouteProtocol `yaml:"protocol" protobuf:"12"`
	MTU          uint32                   `yaml:"mtu,omitempty" protobuf:"13"`
}

RouteStatusSpec describes status of rendered secrets.

func (RouteStatusSpec) DeepCopy

func (o RouteStatusSpec) DeepCopy() RouteStatusSpec

DeepCopy generates a deep copy of RouteStatusSpec.

type STPSpec

type STPSpec struct {
	Enabled bool `yaml:"enabled" protobuf:"1"`
}

STPSpec describes Spanning Tree Protocol (STP) settings of a bridge.

type Status

Status resource holds status of networking setup.

func NewStatus

func NewStatus(namespace resource.Namespace, id resource.ID) *Status

NewStatus initializes a Status resource.

type StatusCheck

type StatusCheck func(*StatusSpec) bool

StatusCheck asserts specific part of Status to be true.

func StatusChecksFromStatuses

func StatusChecksFromStatuses(statuses ...nethelpers.Status) []StatusCheck

StatusChecksFromStatuses converts nethelpers.Status list into list of checks.

type StatusExtension added in v1.4.0

type StatusExtension struct{}

StatusExtension provides auxiliary methods for Status.

func (StatusExtension) ResourceDefinition added in v1.4.0

func (StatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements typed.Extension interface.

type StatusSpec

type StatusSpec struct {
	AddressReady      bool `yaml:"addressReady" protobuf:"1"`
	ConnectivityReady bool `yaml:"connectivityReady" protobuf:"2"`
	HostnameReady     bool `yaml:"hostnameReady" protobuf:"3"`
	EtcFilesReady     bool `yaml:"etcFilesReady" protobuf:"4"`
}

StatusSpec describes network state.

func (StatusSpec) DeepCopy

func (o StatusSpec) DeepCopy() StatusSpec

DeepCopy generates a deep copy of StatusSpec.

type TCPProbeSpec added in v1.4.0

type TCPProbeSpec struct {
	// Endpoint to probe: host:port.
	Endpoint string `yaml:"endpoint" protobuf:"1"`
	// Timeout for the probe.
	Timeout time.Duration `yaml:"timeout" protobuf:"2"`
}

TCPProbeSpec describes the TCP Probe.

type TimeServerSpec

TimeServerSpec resource holds NTP server info.

func NewTimeServerSpec

func NewTimeServerSpec(namespace resource.Namespace, id resource.ID) *TimeServerSpec

NewTimeServerSpec initializes a TimeServerSpec resource.

type TimeServerSpecExtension added in v1.4.0

type TimeServerSpecExtension struct{}

TimeServerSpecExtension provides auxiliary methods for TimeServerSpec.

func (TimeServerSpecExtension) ResourceDefinition added in v1.4.0

ResourceDefinition implements typed.Extension interface.

type TimeServerSpecSpec

type TimeServerSpecSpec struct {
	NTPServers  []string    `yaml:"timeServers" protobuf:"1"`
	ConfigLayer ConfigLayer `yaml:"layer" protobuf:"2"`
}

TimeServerSpecSpec describes NTP servers.

func (TimeServerSpecSpec) DeepCopy

DeepCopy generates a deep copy of TimeServerSpecSpec.

type TimeServerStatus

TimeServerStatus resource holds NTP server info.

func NewTimeServerStatus

func NewTimeServerStatus(namespace resource.Namespace, id resource.ID) *TimeServerStatus

NewTimeServerStatus initializes a TimeServerStatus resource.

type TimeServerStatusExtension added in v1.4.0

type TimeServerStatusExtension struct{}

TimeServerStatusExtension provides auxiliary methods for TimeServerStatus.

func (TimeServerStatusExtension) ResourceDefinition added in v1.4.0

ResourceDefinition implements typed.Extension interface.

type TimeServerStatusSpec

type TimeServerStatusSpec struct {
	NTPServers []string `yaml:"timeServers" protobuf:"1"`
}

TimeServerStatusSpec describes NTP servers.

func (TimeServerStatusSpec) DeepCopy

DeepCopy generates a deep copy of TimeServerStatusSpec.

type ULAPurpose

type ULAPurpose byte

ULAPurpose is the Unique Local Addressing key for the Talos-specific purpose of the prefix.

type VIPEquinixMetalSpec

type VIPEquinixMetalSpec struct {
	ProjectID string `yaml:"projectID" protobuf:"1"`
	DeviceID  string `yaml:"deviceID" protobuf:"2"`
	APIToken  string `yaml:"apiToken" protobuf:"3"`
}

VIPEquinixMetalSpec describes virtual (elastic) IP settings for Equinix Metal.

type VIPHCloudSpec

type VIPHCloudSpec struct {
	DeviceID  int64  `yaml:"deviceID" protobuf:"1"`
	NetworkID int64  `yaml:"networkID" protobuf:"2"`
	APIToken  string `yaml:"apiToken" protobuf:"3"`
}

VIPHCloudSpec describes virtual (elastic) IP settings for Hetzner Cloud.

type VIPOperatorSpec

type VIPOperatorSpec struct {
	IP            netip.Addr `yaml:"ip" protobuf:"1"`
	GratuitousARP bool       `yaml:"gratuitousARP" protobuf:"2"`

	EquinixMetal VIPEquinixMetalSpec `yaml:"equinixMetal,omitempty" protobuf:"3"`
	HCloud       VIPHCloudSpec       `yaml:"hcloud,omitempty" protobuf:"4"`
}

VIPOperatorSpec describes virtual IP operator options.

type VLANSpec

type VLANSpec struct {
	// VID is the vlan ID.
	VID uint16 `yaml:"vlanID" protobuf:"1"`

	// Protocol is the vlan protocol.
	Protocol nethelpers.VLANProtocol `yaml:"vlanProtocol" protobuf:"2"`
}

VLANSpec describes VLAN settings if Kind == "vlan".

func (VLANSpec) ID

func (vlan VLANSpec) ID() uint16

ID Returns the VID for type VLANSpec.

func (VLANSpec) MTU

func (vlan VLANSpec) MTU() uint32

MTU Returns MTU=0 for type VLANSpec.

func (VLANSpec) Mode added in v1.12.0

func (vlan VLANSpec) Mode() nethelpers.VLANProtocol

Mode returns the protocol (mode) for type VLANSpec.

type WireguardPeer

type WireguardPeer struct {
	PublicKey                   string         `yaml:"publicKey" protobuf:"1"`
	PresharedKey                string         `yaml:"presharedKey" protobuf:"2"`
	Endpoint                    string         `yaml:"endpoint" protobuf:"3"`
	PersistentKeepaliveInterval time.Duration  `yaml:"persistentKeepaliveInterval" protobuf:"4"`
	AllowedIPs                  []netip.Prefix `yaml:"allowedIPs" protobuf:"5"`
}

WireguardPeer describes a single peer.

func (*WireguardPeer) Equal

func (peer *WireguardPeer) Equal(other *WireguardPeer) bool

Equal checks two WireguardPeer structs for equality.

`spec` is considered to be the result of getting current Wireguard configuration, while `other` is the new (updated configuration).

type WireguardSpec

type WireguardSpec struct {
	// PrivateKey is used to configure the link, present only in the LinkSpec.
	PrivateKey string `yaml:"privateKey,omitempty" protobuf:"1"`
	// PublicKey is only used in LinkStatus to show the link status.
	PublicKey    string          `yaml:"publicKey,omitempty" protobuf:"2"`
	ListenPort   int             `yaml:"listenPort" protobuf:"3"`
	FirewallMark int             `yaml:"firewallMark" protobuf:"4"`
	Peers        []WireguardPeer `yaml:"peers" protobuf:"5"`
}

WireguardSpec describes Wireguard settings if Kind == "wireguard".

func (*WireguardSpec) Equal

func (spec *WireguardSpec) Equal(other *WireguardSpec) bool

Equal checks two WireguardSpecs for equality.

Both specs should be sorted before calling this method.

`spec` is considered to be the result of getting current Wireguard configuration, while `other` is the new (updated configuration).

func (*WireguardSpec) IsZero

func (spec *WireguardSpec) IsZero() bool

IsZero checks if the WireguardSpec is zero value.

func (*WireguardSpec) Merge

func (spec *WireguardSpec) Merge(other WireguardSpec)

Merge with other Wireguard spec overwriting non-zero values.

func (*WireguardSpec) Sort

func (spec *WireguardSpec) Sort()

Sort the spec so that comparison is possible.

Jump to

Keyboard shortcuts

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