Documentation ¶
Overview ¶
Package network provides resources which describe networking subsystem state.
Index ¶
- Constants
- func AddressID(linkName string, addr netip.Prefix) string
- func AddressReady(spec *StatusSpec) bool
- func ConfigLayerStrings() []string
- func ConnectivityReady(spec *StatusSpec) bool
- func EtcFilesReady(spec *StatusSpec) bool
- func FilteredNodeAddressID(kind resource.ID, filterID string) resource.ID
- func HostnameReady(spec *StatusSpec) bool
- func IsULA(ip netip.Addr, purpose ULAPurpose) bool
- func LayeredID(layer ConfigLayer, id string) string
- func LinkID(linkName string) string
- func NotSideroLinkIP(ip netip.Addr) bool
- func OperatorID(operator Operator, linkName string) string
- func OperatorStrings() []string
- func RouteID(table nethelpers.RoutingTable, family nethelpers.Family, ...) string
- func ULAPrefix(clusterID string, purpose ULAPurpose) netip.Prefix
- type AddressSpec
- type AddressSpecExtension
- type AddressSpecSpec
- type AddressStatus
- type AddressStatusExtension
- type AddressStatusSpec
- type BondMasterSpec
- type BondSlave
- type BridgeMasterSpec
- type BridgeSlave
- type BridgeVLANSpec
- type ConfigLayer
- type DHCP4OperatorSpec
- type DHCP6OperatorSpec
- type DNSConn
- type DNSResolveCache
- type DNSResolveCacheExtension
- type DNSResolveCacheSpec
- type DNSUpstream
- type DNSUpstreamExtension
- type DNSUpstreamSpec
- type DNSUpstreamSpecSpec
- type DeviceConfigSpec
- type DeviceConfigSpecExtension
- type DeviceConfigSpecSpec
- type HardwareAddr
- type HardwareAddrExtension
- type HardwareAddrSpec
- type HostDNSConfig
- type HostDNSConfigExtension
- type HostDNSConfigSpec
- type HostnameSpec
- type HostnameSpecExtension
- type HostnameSpecSpec
- type HostnameStatus
- type HostnameStatusExtension
- type HostnameStatusSpec
- type LinkRefresh
- type LinkRefreshExtension
- type LinkRefreshSpec
- type LinkSpec
- type LinkSpecExtension
- type LinkSpecSpec
- type LinkStatus
- type LinkStatusExtension
- type LinkStatusSpec
- type NfTablesAddressMatch
- type NfTablesChain
- type NfTablesChainExtension
- type NfTablesChainSpec
- type NfTablesClampMSS
- type NfTablesConntrackStateMatch
- type NfTablesIfNameMatch
- type NfTablesLayer4Match
- type NfTablesLimitMatch
- type NfTablesMark
- type NfTablesPortMatch
- type NfTablesRule
- type NodeAddress
- type NodeAddressExtension
- type NodeAddressFilter
- type NodeAddressFilterExtension
- type NodeAddressFilterSpec
- type NodeAddressSpec
- type Operator
- type OperatorSpec
- type OperatorSpecExtension
- type OperatorSpecSpec
- type PortRange
- type ProbeSpec
- type ProbeSpecExtension
- type ProbeSpecSpec
- type ProbeStatus
- type ProbeStatusExtension
- type ProbeStatusSpec
- type Proxy
- type ReadyCondition
- type ResolverSpec
- type ResolverSpecExtension
- type ResolverSpecSpec
- type ResolverStatus
- type ResolverStatusExtension
- type ResolverStatusSpec
- type RouteSpec
- type RouteSpecExtension
- type RouteSpecSpec
- type RouteStatus
- type RouteStatusExtension
- type RouteStatusSpec
- type STPSpec
- type Status
- type StatusCheck
- type StatusExtension
- type StatusSpec
- type TCPProbeSpec
- type TimeServerSpec
- type TimeServerSpecExtension
- type TimeServerSpecSpec
- type TimeServerStatus
- type TimeServerStatusExtension
- type TimeServerStatusSpec
- type ULAPurpose
- type VIPEquinixMetalSpec
- type VIPHCloudSpec
- type VIPOperatorSpec
- type VLANSpec
- type WireguardPeer
- type WireguardSpec
Constants ¶
const ( LinkKindVLAN = "vlan" LinkKindBond = "bond" LinkKindBridge = "bridge" LinkKindWireguard = "wireguard" )
Link kinds.
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.
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 )
const AddressSpecType = resource.Type("AddressSpecs.net.talos.dev")
AddressSpecType is type of AddressSpec resource.
const AddressStatusType = resource.Type("AddressStatuses.net.talos.dev")
AddressStatusType is type of AddressStatus resource.
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.
const DNSResolveCacheType = resource.Type("DNSResolveCaches.net.talos.dev")
DNSResolveCacheType is type of DNSResolveCache resource.
const DNSUpstreamType = resource.Type("DNSUpstreams.net.talos.dev")
DNSUpstreamType is type of DNSUpstream resource.
const DefaultRouteMetric = 1024
DefaultRouteMetric is the default route metric if no metric was specified explicitly.
const DeviceConfigSpecType = resource.Type("DeviceConfigSpecs.net.talos.dev")
DeviceConfigSpecType is type of DeviceConfigSpec resource.
const FirstHardwareAddr = resource.ID("first")
FirstHardwareAddr is a resource ID for the first NIC HW addr.
const HardwareAddrType = resource.Type("HardwareAddresses.net.talos.dev")
HardwareAddrType is type of HardwareAddr resource.
const HostDNSConfigID resource.ID = "config"
HostDNSConfigID is the singleton ID for HostDNSConfig.
const HostDNSConfigType = resource.Type("HostDNSConfigs.net.talos.dev")
HostDNSConfigType is type of HostDNSConfig resource.
const HostnameID resource.ID = "hostname"
HostnameID is the ID of the singleton instance.
const HostnameSpecType = resource.Type("HostnameSpecs.net.talos.dev")
HostnameSpecType is type of HostnameSpec resource.
const HostnameStatusType = resource.Type("HostnameStatuses.net.talos.dev")
HostnameStatusType is type of HostnameStatus resource.
const LinkRefreshType = resource.Type("LinkRefreshes.net.talos.dev")
LinkRefreshType is type of LinkRefresh resource.
const LinkSpecType = resource.Type("LinkSpecs.net.talos.dev")
LinkSpecType is type of LinkSpec resource.
const LinkStatusType = resource.Type("LinkStatuses.net.talos.dev")
LinkStatusType is type of LinkStatus resource.
const NamespaceName resource.Namespace = "network"
NamespaceName contains resources related to networking.
const NfTablesChainType = resource.Type("NfTablesChains.net.talos.dev")
NfTablesChainType is type of NfTablesChain resource.
const NodeAddressFilterType = resource.Type("NodeAddressFilters.net.talos.dev")
NodeAddressFilterType is type of NodeAddressFilter resource.
const NodeAddressType = resource.Type("NodeAddresses.net.talos.dev")
NodeAddressType is type of NodeAddress resource.
const OperatorSpecType = resource.Type("OperatorSpecs.net.talos.dev")
OperatorSpecType is type of OperatorSpec resource.
const ProbeSpecType = resource.Type("ProbeSpecs.net.talos.dev")
ProbeSpecType is type of ProbeSpec resource.
const ProbeStatusType = resource.Type("ProbeStatuses.net.talos.dev")
ProbeStatusType is type of ProbeStatus resource.
const ResolverID resource.ID = "resolvers"
ResolverID is the ID of the singleton instance.
const ResolverSpecType = resource.Type("ResolverSpecs.net.talos.dev")
ResolverSpecType is type of ResolverSpec resource.
const ResolverStatusType = resource.Type("ResolverStatuses.net.talos.dev")
ResolverStatusType is type of ResolverStatus resource.
const RouteSpecType = resource.Type("RouteSpecs.net.talos.dev")
RouteSpecType is type of RouteSpec resource.
const RouteStatusType = resource.Type("RouteStatuses.net.talos.dev")
RouteStatusType is type of RouteStatus resource.
const StatusID resource.ID = "status"
StatusID is the resource ID of the singleton instance.
const StatusType = resource.Type("NetworkStatuses.net.talos.dev")
StatusType is type of Status resource.
const TimeServerID resource.ID = "timeservers"
TimeServerID is the ID of the singleton instance.
const TimeServerSpecType = resource.Type("TimeServerSpecs.net.talos.dev")
TimeServerSpecType is type of TimeServerSpec resource.
const TimeServerStatusType = resource.Type("TimeServerStatuses.net.talos.dev")
TimeServerStatusType is type of TimeServerStatus resource.
Variables ¶
This section is empty.
Functions ¶
func AddressReady ¶
func AddressReady(spec *StatusSpec) bool
AddressReady checks if address is ready.
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 ¶
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 NotSideroLinkIP ¶
NotSideroLinkIP is a shorthand for !IsULA(ip, ULASideroLink).
func OperatorID ¶
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 ¶
type AddressSpec = typed.Resource[AddressSpecSpec, AddressSpecExtension]
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"` 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 ¶
type AddressStatus = typed.Resource[AddressStatusSpec, AddressStatusExtension]
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"` }
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 nethelpers.BondMode `yaml:"mode" protobuf:"1"` HashPolicy nethelpers.BondXmitHashPolicy `yaml:"xmitHashPolicy" protobuf:"2"` LACPRate nethelpers.LACPRate `yaml:"lacpRate" protobuf:"3"` ARPValidate nethelpers.ARPValidate `yaml:"arpValidate" protobuf:"4"` ARPAllTargets nethelpers.ARPAllTargets `yaml:"arpAllTargets" protobuf:"5"` PrimaryIndex uint32 `yaml:"primary,omitempty" protobuf:"6"` PrimaryReselect nethelpers.PrimaryReselect `yaml:"primaryReselect" protobuf:"7"` FailOverMac nethelpers.FailOverMAC `yaml:"failOverMac" protobuf:"8"` ADSelect nethelpers.ADSelect `yaml:"adSelect,omitempty" protobuf:"9"` MIIMon uint32 `yaml:"miimon,omitempty" protobuf:"10"` UpDelay uint32 `yaml:"updelay,omitempty" protobuf:"11"` DownDelay uint32 `yaml:"downdelay,omitempty" protobuf:"12"` ARPInterval uint32 `yaml:"arpInterval,omitempty" protobuf:"13"` ResendIGMP uint32 `yaml:"resendIgmp,omitempty" protobuf:"14"` MinLinks uint32 `yaml:"minLinks,omitempty" protobuf:"15"` LPInterval uint32 `yaml:"lpInterval,omitempty" protobuf:"16"` PacketsPerSlave uint32 `yaml:"packetsPerSlave,omitempty" protobuf:"17"` NumPeerNotif uint8 `yaml:"numPeerNotif,omitempty" protobuf:"18"` TLBDynamicLB uint8 `yaml:"tlbLogicalLb,omitempty" protobuf:"19"` AllSlavesActive uint8 `yaml:"allSlavesActive,omitempty" protobuf:"20"` UseCarrier bool `yaml:"useCarrier,omitempty" protobuf:"21"` ADActorSysPrio uint16 `yaml:"adActorSysPrio,omitempty" protobuf:"22"` ADUserPortKey uint16 `yaml:"adUserPortKey,omitempty" protobuf:"23"` PeerNotifyDelay uint32 `yaml:"peerNotifyDelay,omitempty" protobuf:"24"` }
BondMasterSpec describes bond settings if Kind == "bond".
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 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"` }
DHCP4OperatorSpec describes DHCP4 operator options.
type DHCP6OperatorSpec ¶
type DHCP6OperatorSpec struct { DUID string `yaml:"DUID,omitempty" protobuf:"1"` RouteMetric uint32 `yaml:"routeMetric" protobuf:"2"` SkipHostnameRequest bool `yaml:"skipHostnameRequest,omitempty" protobuf:"3"` }
DHCP6OperatorSpec describes DHCP6 operator options.
type DNSConn ¶
type DNSConn struct {
// contains filtered or unexported fields
}
DNSConn is a wrapper around a Proxy.
func NewDNSConn ¶
NewDNSConn initializes a new DNSConn.
func (*DNSConn) Healthcheck ¶
func (u *DNSConn) Healthcheck()
Healthcheck kicks of a round of health checks for this DNSConn.
type DNSResolveCache ¶ added in v1.7.0
type DNSResolveCache = typed.Resource[DNSResolveCacheSpec, DNSResolveCacheExtension]
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
func (DNSResolveCacheExtension) ResourceDefinition() meta.ResourceDefinitionSpec
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
func (o DNSResolveCacheSpec) DeepCopy() DNSResolveCacheSpec
DeepCopy generates a deep copy of DNSResolveCacheSpec.
type DNSUpstream ¶ added in v1.7.0
type DNSUpstream = typed.Resource[DNSUpstreamSpec, DNSUpstreamExtension]
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 ¶
type DeviceConfigSpec = typed.Resource[DeviceConfigSpecSpec, DeviceConfigSpecExtension]
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
func (DeviceConfigSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type DeviceConfigSpecSpec ¶
DeviceConfigSpecSpec contains the spec of a device config.
func (DeviceConfigSpecSpec) DeepCopy ¶
func (spec DeviceConfigSpecSpec) DeepCopy() DeviceConfigSpecSpec
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 HardwareAddr ¶
type HardwareAddr = typed.Resource[HardwareAddrSpec, HardwareAddrExtension]
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
type HostDNSConfig = typed.Resource[HostDNSConfigSpec, HostDNSConfigExtension]
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 ¶
type HostnameSpec = typed.Resource[HostnameSpecSpec, HostnameSpecExtension]
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 ¶
type HostnameStatus = typed.Resource[HostnameStatusSpec, HostnameStatusExtension]
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
func (HostnameStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec
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 ¶
func (o HostnameStatusSpec) DeepCopy() HostnameStatusSpec
DeepCopy generates a deep copy of HostnameStatusSpec.
func (*HostnameStatusSpec) FQDN ¶
func (spec *HostnameStatusSpec) FQDN() string
FQDN returns the fully-qualified domain name.
type LinkRefresh ¶
type LinkRefresh = typed.Resource[LinkRefreshSpec, LinkRefreshExtension]
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) DeepCopy ¶
func (o LinkRefreshSpec) DeepCopy() LinkRefreshSpec
DeepCopy generates a deep copy of LinkRefreshSpec.
type LinkSpec ¶
type LinkSpec = typed.Resource[LinkSpecSpec, LinkSpecExtension]
LinkSpec resource describes desired state of the link (network interface).
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"` // 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"` }
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 ¶
type LinkStatus = typed.Resource[LinkStatusSpec, LinkStatusExtension]
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. 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
type NfTablesChain = typed.Resource[NfTablesChainSpec, NfTablesChainExtension]
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 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"` }
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 ¶
type NodeAddress = typed.Resource[NodeAddressSpec, NodeAddressExtension]
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 ¶
type NodeAddressFilter = typed.Resource[NodeAddressFilterSpec, NodeAddressFilterExtension]
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
func (NodeAddressFilterExtension) ResourceDefinition() meta.ResourceDefinitionSpec
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 ¶
func (o NodeAddressFilterSpec) DeepCopy() NodeAddressFilterSpec
DeepCopy generates a deep copy of NodeAddressFilterSpec.
type NodeAddressSpec ¶
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.
Operator list.
func OperatorString ¶
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 ¶
IsAOperator returns "true" if the value is listed in the enum definition. "false" otherwise
func (Operator) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Operator
func (*Operator) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Operator
type OperatorSpec ¶
type OperatorSpec = typed.Resource[OperatorSpecSpec, OperatorSpecExtension]
OperatorSpec resource holds DNS resolver info.
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 DNS resolvers.
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 ProbeSpec ¶ added in v1.4.0
type ProbeSpec = typed.Resource[ProbeSpecSpec, ProbeSpecExtension]
ProbeSpec resource holds Probe specification to be run.
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.
type ProbeStatus ¶ added in v1.4.0
type ProbeStatus = typed.Resource[ProbeStatusSpec, ProbeStatusExtension]
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
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
type ResolverSpec ¶
type ResolverSpec = typed.Resource[ResolverSpecSpec, ResolverSpecExtension]
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"` }
ResolverSpecSpec describes DNS resolvers.
func (ResolverSpecSpec) DeepCopy ¶
func (o ResolverSpecSpec) DeepCopy() ResolverSpecSpec
DeepCopy generates a deep copy of ResolverSpecSpec.
type ResolverStatus ¶
type ResolverStatus = typed.Resource[ResolverStatusSpec, ResolverStatusExtension]
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
func (ResolverStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type ResolverStatusSpec ¶
ResolverStatusSpec describes DNS resolvers.
func (ResolverStatusSpec) DeepCopy ¶
func (o ResolverStatusSpec) DeepCopy() ResolverStatusSpec
DeepCopy generates a deep copy of ResolverStatusSpec.
type RouteSpec ¶
type RouteSpec = typed.Resource[RouteSpecSpec, RouteSpecExtension]
RouteSpec resource holds route specification to be applied to the kernel.
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 ¶
type RouteStatus = typed.Resource[RouteStatusSpec, RouteStatusExtension]
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 ¶
type Status = typed.Resource[StatusSpec, StatusExtension]
Status resource holds status of networking setup.
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 ¶
type TimeServerSpec = typed.Resource[TimeServerSpecSpec, TimeServerSpecExtension]
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
func (TimeServerSpecExtension) ResourceDefinition() meta.ResourceDefinitionSpec
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 ¶
func (o TimeServerSpecSpec) DeepCopy() TimeServerSpecSpec
DeepCopy generates a deep copy of TimeServerSpecSpec.
type TimeServerStatus ¶
type TimeServerStatus = typed.Resource[TimeServerStatusSpec, TimeServerStatusExtension]
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
func (TimeServerStatusExtension) ResourceDefinition() meta.ResourceDefinitionSpec
ResourceDefinition implements typed.Extension interface.
type TimeServerStatusSpec ¶
type TimeServerStatusSpec struct {
NTPServers []string `yaml:"timeServers" protobuf:"1"`
}
TimeServerStatusSpec describes NTP servers.
func (TimeServerStatusSpec) DeepCopy ¶
func (o TimeServerStatusSpec) DeepCopy() TimeServerStatusSpec
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".
type WireguardPeer ¶
type WireguardPeer struct { PublicKey string `yaml:"publicKey" protobuf:"1"` 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.
Source Files ¶
- address_spec.go
- address_status.go
- condition.go
- configlayer.go
- configlayer_enumer.go
- deep_copy.generated.go
- device_config_spec.go
- dns_resolve_cache.go
- dns_upstream.go
- hardrware_addr.go
- hostdns_config.go
- hostname_spec.go
- hostname_status.go
- link.go
- link_refresh.go
- link_spec.go
- link_status.go
- network.go
- nftables_chain.go
- node_address.go
- node_address_filter.go
- operator.go
- operator_spec.go
- probe_spec.go
- probe_status.go
- resolver_spec.go
- resolver_status.go
- route_spec.go
- route_status.go
- status.go
- timeserver_spec.go
- timeserver_status.go
- ula.go