mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-08 12:21:46 +01:00
feat: implement bond multi-doc configuration
Also expand internal bond configuration to cover missing fields. They are not going to be exposed in legacy configuration. Fixes #10960 Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
75fe475828
commit
f4ad3077b0
@ -70,6 +70,12 @@ enum NethelpersAddressSortAlgorithm {
|
||||
ADDRESS_SORT_ALGORITHM_V2 = 1;
|
||||
}
|
||||
|
||||
// NethelpersADLACPActive is ADLACPActive.
|
||||
enum NethelpersADLACPActive {
|
||||
ADLACP_ACTIVE_OFF = 0;
|
||||
ADLACP_ACTIVE_ON = 1;
|
||||
}
|
||||
|
||||
// NethelpersADSelect is ADSelect.
|
||||
enum NethelpersADSelect {
|
||||
AD_SELECT_STABLE = 0;
|
||||
@ -89,6 +95,9 @@ enum NethelpersARPValidate {
|
||||
ARP_VALIDATE_ACTIVE = 1;
|
||||
ARP_VALIDATE_BACKUP = 2;
|
||||
ARP_VALIDATE_ALL = 3;
|
||||
ARP_VALIDATE_FILTER = 4;
|
||||
ARP_VALIDATE_FILTER_ACTIVE = 5;
|
||||
ARP_VALIDATE_FILTER_BACKUP = 6;
|
||||
}
|
||||
|
||||
// NethelpersAutoHostnameKind is a kind of automatically generated hostname.
|
||||
|
||||
@ -63,6 +63,10 @@ message BondMasterSpec {
|
||||
uint32 ad_actor_sys_prio = 22;
|
||||
uint32 ad_user_port_key = 23;
|
||||
uint32 peer_notify_delay = 24;
|
||||
repeated common.NetIP arpip_targets = 25;
|
||||
repeated common.NetIP nsip6_targets = 26;
|
||||
talos.resource.definitions.enums.NethelpersADLACPActive adlacp_active = 27;
|
||||
uint32 missed_max = 28;
|
||||
}
|
||||
|
||||
// BondSlave contains a bond's master name and slave index.
|
||||
|
||||
@ -5,7 +5,11 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/netip"
|
||||
|
||||
"github.com/mdlayher/netlink"
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/machinery/nethelpers"
|
||||
@ -26,6 +30,8 @@ type bondMaster struct {
|
||||
}
|
||||
|
||||
// FillDefaults fills zero values with proper default values.
|
||||
//
|
||||
//nolint:gocyclo
|
||||
func (a bondMaster) FillDefaults() {
|
||||
bond := a.BondMasterSpec
|
||||
|
||||
@ -49,14 +55,22 @@ func (a bondMaster) FillDefaults() {
|
||||
bond.TLBDynamicLB = 1
|
||||
}
|
||||
|
||||
if bond.Mode == nethelpers.BondMode8023AD {
|
||||
if bond.Mode == nethelpers.BondMode8023AD && bond.ADActorSysPrio == 0 {
|
||||
bond.ADActorSysPrio = 65535
|
||||
}
|
||||
|
||||
if bond.MissedMax == 0 {
|
||||
bond.MissedMax = 2
|
||||
}
|
||||
|
||||
if bond.Mode != nethelpers.BondMode8023AD {
|
||||
bond.ADLACPActive = nethelpers.ADLACPActiveOn
|
||||
}
|
||||
}
|
||||
|
||||
// Encode the BondMasterSpec into netlink attributes.
|
||||
//
|
||||
//nolint:gocyclo
|
||||
//nolint:gocyclo,cyclop
|
||||
func (a bondMaster) Encode() ([]byte, error) {
|
||||
bond := a.BondMasterSpec
|
||||
|
||||
@ -67,6 +81,7 @@ func (a bondMaster) Encode() ([]byte, error) {
|
||||
|
||||
if bond.Mode == nethelpers.BondMode8023AD {
|
||||
encoder.Uint8(unix.IFLA_BOND_AD_LACP_RATE, uint8(bond.LACPRate))
|
||||
encoder.Uint8(unix.IFLA_BOND_AD_LACP_ACTIVE, uint8(bond.ADLACPActive))
|
||||
}
|
||||
|
||||
if bond.Mode != nethelpers.BondMode8023AD && bond.Mode != nethelpers.BondModeALB && bond.Mode != nethelpers.BondModeTLB {
|
||||
@ -76,7 +91,9 @@ func (a bondMaster) Encode() ([]byte, error) {
|
||||
encoder.Uint32(unix.IFLA_BOND_ARP_ALL_TARGETS, uint32(bond.ARPAllTargets))
|
||||
|
||||
if bond.Mode == nethelpers.BondModeActiveBackup || bond.Mode == nethelpers.BondModeALB || bond.Mode == nethelpers.BondModeTLB {
|
||||
encoder.Uint32(unix.IFLA_BOND_PRIMARY, bond.PrimaryIndex)
|
||||
if bond.PrimaryIndex != nil {
|
||||
encoder.Uint32(unix.IFLA_BOND_PRIMARY, *bond.PrimaryIndex)
|
||||
}
|
||||
}
|
||||
|
||||
encoder.Uint8(unix.IFLA_BOND_PRIMARY_RESELECT, uint8(bond.PrimaryReselect))
|
||||
@ -91,6 +108,32 @@ func (a bondMaster) Encode() ([]byte, error) {
|
||||
|
||||
if bond.Mode != nethelpers.BondMode8023AD && bond.Mode != nethelpers.BondModeALB && bond.Mode != nethelpers.BondModeTLB {
|
||||
encoder.Uint32(unix.IFLA_BOND_ARP_INTERVAL, bond.ARPInterval)
|
||||
|
||||
encoder.Nested(unix.IFLA_BOND_ARP_IP_TARGET, func(nae *netlink.AttributeEncoder) error {
|
||||
for i, addr := range bond.ARPIPTargets {
|
||||
if !addr.Is4() {
|
||||
return fmt.Errorf("%s is not IPV4 address", addr)
|
||||
}
|
||||
|
||||
ip := addr.As4()
|
||||
nae.Bytes(uint16(i), ip[:])
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
encoder.Nested(unix.IFLA_BOND_NS_IP6_TARGET, func(nae *netlink.AttributeEncoder) error {
|
||||
for i, addr := range bond.NSIP6Targets {
|
||||
if !addr.Is6() {
|
||||
return fmt.Errorf("%s is not IPV6 address", addr)
|
||||
}
|
||||
|
||||
ip := addr.As16()
|
||||
nae.Bytes(uint16(i), ip[:])
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
encoder.Uint32(unix.IFLA_BOND_RESEND_IGMP, bond.ResendIGMP)
|
||||
@ -126,6 +169,10 @@ func (a bondMaster) Encode() ([]byte, error) {
|
||||
encoder.Uint32(unix.IFLA_BOND_PEER_NOTIF_DELAY, bond.PeerNotifyDelay)
|
||||
}
|
||||
|
||||
if bond.MissedMax != 0 {
|
||||
encoder.Uint8(unix.IFLA_BOND_MISSED_MAX, bond.MissedMax)
|
||||
}
|
||||
|
||||
return encoder.Encode()
|
||||
}
|
||||
|
||||
@ -153,7 +200,7 @@ func (a bondMaster) Decode(data []byte) error {
|
||||
case unix.IFLA_BOND_ARP_ALL_TARGETS:
|
||||
bond.ARPAllTargets = nethelpers.ARPAllTargets(decoder.Uint32())
|
||||
case unix.IFLA_BOND_PRIMARY:
|
||||
bond.PrimaryIndex = decoder.Uint32()
|
||||
bond.PrimaryIndex = pointer.To(decoder.Uint32())
|
||||
case unix.IFLA_BOND_PRIMARY_RESELECT:
|
||||
bond.PrimaryReselect = nethelpers.PrimaryReselect(decoder.Uint8())
|
||||
case unix.IFLA_BOND_FAIL_OVER_MAC:
|
||||
@ -168,6 +215,34 @@ func (a bondMaster) Decode(data []byte) error {
|
||||
bond.DownDelay = decoder.Uint32()
|
||||
case unix.IFLA_BOND_ARP_INTERVAL:
|
||||
bond.ARPInterval = decoder.Uint32()
|
||||
case unix.IFLA_BOND_ARP_IP_TARGET:
|
||||
decoder.Nested(func(nad *netlink.AttributeDecoder) error {
|
||||
for nad.Next() {
|
||||
addr, ok := netip.AddrFromSlice(nad.Bytes())
|
||||
|
||||
if ok {
|
||||
bond.ARPIPTargets = append(bond.ARPIPTargets, addr)
|
||||
} else {
|
||||
return fmt.Errorf("invalid ARP IP target")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
case unix.IFLA_BOND_NS_IP6_TARGET:
|
||||
decoder.Nested(func(nad *netlink.AttributeDecoder) error {
|
||||
for nad.Next() {
|
||||
addr, ok := netip.AddrFromSlice(nad.Bytes())
|
||||
|
||||
if ok {
|
||||
bond.NSIP6Targets = append(bond.NSIP6Targets, addr)
|
||||
} else {
|
||||
return fmt.Errorf("invalid NS IP6 target")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
case unix.IFLA_BOND_RESEND_IGMP:
|
||||
bond.ResendIGMP = decoder.Uint32()
|
||||
case unix.IFLA_BOND_MIN_LINKS:
|
||||
@ -190,6 +265,10 @@ func (a bondMaster) Decode(data []byte) error {
|
||||
bond.ADUserPortKey = decoder.Uint16()
|
||||
case unix.IFLA_BOND_PEER_NOTIF_DELAY:
|
||||
bond.PeerNotifyDelay = decoder.Uint32()
|
||||
case unix.IFLA_BOND_AD_LACP_ACTIVE:
|
||||
bond.ADLACPActive = nethelpers.ADLACPActive(decoder.Uint8())
|
||||
case unix.IFLA_BOND_MISSED_MAX:
|
||||
bond.MissedMax = decoder.Uint8()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -284,7 +284,7 @@ func ParseCmdlineNetwork(cmdline *procfs.Cmdline, linkNameResolver *network.Link
|
||||
bondLinkSpec.MTU = uint32(mtu)
|
||||
}
|
||||
|
||||
if err := SetBondMaster(&bondLinkSpec, &bondOptions); err != nil {
|
||||
if err := SetBondMasterLegacy(&bondLinkSpec, &bondOptions); err != nil {
|
||||
return settings, fmt.Errorf("error setting bond master: %w", err)
|
||||
}
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import (
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -57,6 +58,9 @@ func TestCmdlineParse(t *testing.T) {
|
||||
NumPeerNotif: 1,
|
||||
TLBDynamicLB: 1,
|
||||
UseCarrier: true,
|
||||
PrimaryIndex: pointer.To[uint32](0),
|
||||
ADLACPActive: nethelpers.ADLACPActiveOn,
|
||||
MissedMax: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -404,6 +408,8 @@ func TestCmdlineParse(t *testing.T) {
|
||||
NumPeerNotif: 1,
|
||||
TLBDynamicLB: 1,
|
||||
UseCarrier: true,
|
||||
PrimaryIndex: pointer.To[uint32](0),
|
||||
MissedMax: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@ -16,6 +16,7 @@ import (
|
||||
"github.com/siderolabs/gen/maps"
|
||||
"github.com/siderolabs/gen/optional"
|
||||
"github.com/siderolabs/gen/pair/ordered"
|
||||
"github.com/siderolabs/gen/xslices"
|
||||
"github.com/siderolabs/go-procfs/procfs"
|
||||
"go.uber.org/zap"
|
||||
|
||||
@ -349,7 +350,7 @@ func (ctrl *LinkConfigController) processDevicesConfiguration(
|
||||
}
|
||||
|
||||
if device.Bond() != nil {
|
||||
if err := SetBondMaster(linkMap[deviceInterface], device.Bond()); err != nil {
|
||||
if err := SetBondMasterLegacy(linkMap[deviceInterface], device.Bond()); err != nil {
|
||||
logger.Error("error parsing bond config", zap.Error(err))
|
||||
}
|
||||
}
|
||||
@ -444,7 +445,24 @@ func (ctrl *LinkConfigController) processLinkConfigs(logger *zap.Logger, linkMap
|
||||
case talosconfig.NetworkDummyLinkConfig:
|
||||
dummyLink(linkMap[linkName])
|
||||
case talosconfig.NetworkVLANConfig:
|
||||
vlanLink(linkMap[linkName], linkName, specificLinkConfig.ParentLink(), networkVLANConfigToVlaner{specificLinkConfig})
|
||||
parentLink := linkNameResolver.Resolve(specificLinkConfig.ParentLink())
|
||||
vlanLink(linkMap[linkName], linkName, parentLink, networkVLANConfigToVlaner{specificLinkConfig})
|
||||
case talosconfig.NetworkBondConfig:
|
||||
SendBondMaster(linkMap[linkName], specificLinkConfig)
|
||||
|
||||
bondedLinks := xslices.Map(specificLinkConfig.Links(), linkNameResolver.Resolve)
|
||||
|
||||
for idx, slaveLinkName := range bondedLinks {
|
||||
if _, exists := linkMap[slaveLinkName]; !exists {
|
||||
linkMap[slaveLinkName] = &network.LinkSpecSpec{
|
||||
Name: slaveLinkName,
|
||||
Up: true,
|
||||
ConfigLayer: network.ConfigMachineConfiguration,
|
||||
}
|
||||
}
|
||||
|
||||
SetBondSlave(linkMap[slaveLinkName], ordered.MakePair(linkName, idx))
|
||||
}
|
||||
default:
|
||||
logger.Error("unknown link config type", zap.String("linkName", linkName), zap.String("type", fmt.Sprintf("%T", specificLinkConfig)))
|
||||
}
|
||||
|
||||
@ -476,7 +476,15 @@ func (suite *LinkConfigSuite) TestMachineConfigurationNewStyle() {
|
||||
vl1.LinkMTU = 200
|
||||
vl1.LinkUp = pointer.To(true)
|
||||
|
||||
ctr, err := container.New(dc1, lc1, vl1)
|
||||
dc2 := networkcfg.NewDummyLinkConfigV1Alpha1("dummy2")
|
||||
dc3 := networkcfg.NewDummyLinkConfigV1Alpha1("dummy3")
|
||||
|
||||
bc1 := networkcfg.NewBondConfigV1Alpha1("bond357")
|
||||
bc1.BondMode = pointer.To(nethelpers.BondModeActiveBackup)
|
||||
bc1.BondLinks = []string{"dummy2", "dummy3"}
|
||||
bc1.BondUpDelay = pointer.To(uint32(200))
|
||||
|
||||
ctr, err := container.New(dc1, lc1, vl1, dc2, dc3, bc1)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
cfg := config.NewMachineConfig(ctr)
|
||||
@ -501,7 +509,10 @@ func (suite *LinkConfigSuite) TestMachineConfigurationNewStyle() {
|
||||
[]string{
|
||||
"configuration/eth0",
|
||||
"configuration/dummy1",
|
||||
"configuration/dummy2",
|
||||
"configuration/dummy3",
|
||||
"configuration/dummy1.100",
|
||||
"configuration/bond357",
|
||||
}, func(r *network.LinkSpec, asrt *assert.Assertions) {
|
||||
asrt.Equal(network.ConfigMachineConfiguration, r.TypedSpec().ConfigLayer)
|
||||
|
||||
@ -510,11 +521,15 @@ func (suite *LinkConfigSuite) TestMachineConfigurationNewStyle() {
|
||||
asrt.True(r.TypedSpec().Up)
|
||||
asrt.False(r.TypedSpec().Logical)
|
||||
asrt.EqualValues(9001, r.TypedSpec().MTU)
|
||||
case "dummy1":
|
||||
case "dummy1", "dummy2", "dummy3":
|
||||
asrt.True(r.TypedSpec().Up)
|
||||
asrt.True(r.TypedSpec().Logical)
|
||||
asrt.Equal(nethelpers.LinkEther, r.TypedSpec().Type)
|
||||
asrt.Equal("dummy", r.TypedSpec().Kind)
|
||||
|
||||
if r.TypedSpec().Name == "dummy2" || r.TypedSpec().Name == "dummy3" {
|
||||
asrt.Equal("bond357", r.TypedSpec().BondSlave.MasterName)
|
||||
}
|
||||
case "dummy1.100":
|
||||
asrt.True(r.TypedSpec().Up)
|
||||
asrt.True(r.TypedSpec().Logical)
|
||||
@ -524,6 +539,13 @@ func (suite *LinkConfigSuite) TestMachineConfigurationNewStyle() {
|
||||
asrt.Equal(nethelpers.VLANProtocol8021AD, r.TypedSpec().VLAN.Protocol)
|
||||
asrt.EqualValues(100, r.TypedSpec().VLAN.VID)
|
||||
asrt.EqualValues(200, r.TypedSpec().MTU)
|
||||
case "bond357":
|
||||
asrt.True(r.TypedSpec().Up)
|
||||
asrt.True(r.TypedSpec().Logical)
|
||||
asrt.Equal(nethelpers.LinkEther, r.TypedSpec().Type)
|
||||
asrt.Equal(network.LinkKindBond, r.TypedSpec().Kind)
|
||||
asrt.Equal(nethelpers.BondModeActiveBackup, r.TypedSpec().BondMaster.Mode)
|
||||
asrt.EqualValues(200, r.TypedSpec().BondMaster.UpDelay)
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@ -393,7 +393,12 @@ func (ctrl *LinkSpecController) syncLink(ctx context.Context, r controller.Runti
|
||||
return fmt.Errorf("error parsing bond attributes for %q: %w", link.TypedSpec().Name, err)
|
||||
}
|
||||
|
||||
if existingBond != link.TypedSpec().BondMaster {
|
||||
// primaryIndex might be reported from the kernel, but if it's nil in the spec, we should treat it as equal
|
||||
if existingBond.PrimaryIndex != nil && link.TypedSpec().BondMaster.PrimaryIndex == nil {
|
||||
existingBond.PrimaryIndex = nil
|
||||
}
|
||||
|
||||
if !existingBond.Equal(&link.TypedSpec().BondMaster) {
|
||||
logger.Debug("updating bond settings",
|
||||
zap.String("old", fmt.Sprintf("%+v", existingBond)),
|
||||
zap.String("new", fmt.Sprintf("%+v", link.TypedSpec().BondMaster)),
|
||||
|
||||
@ -9,6 +9,7 @@ import (
|
||||
"net"
|
||||
|
||||
"github.com/siderolabs/gen/pair/ordered"
|
||||
"github.com/siderolabs/go-pointer"
|
||||
|
||||
networkadapter "github.com/siderolabs/talos/internal/app/machined/pkg/adapters/network"
|
||||
talosconfig "github.com/siderolabs/talos/pkg/machinery/config/config"
|
||||
@ -24,10 +25,46 @@ func SetBondSlave(link *network.LinkSpecSpec, bond ordered.Pair[string, int]) {
|
||||
}
|
||||
}
|
||||
|
||||
// SetBondMaster sets the bond master spec.
|
||||
// SendBondMaster sets the bond master spec.
|
||||
func SendBondMaster(link *network.LinkSpecSpec, bond talosconfig.NetworkBondConfig) {
|
||||
link.Logical = true
|
||||
link.Kind = network.LinkKindBond
|
||||
link.Type = nethelpers.LinkEther
|
||||
link.BondMaster.Mode = bond.Mode()
|
||||
link.BondMaster.MIIMon = bond.MIIMon().ValueOrZero()
|
||||
link.BondMaster.UpDelay = bond.UpDelay().ValueOrZero()
|
||||
link.BondMaster.DownDelay = bond.DownDelay().ValueOrZero()
|
||||
link.BondMaster.UseCarrier = bond.UseCarrier().ValueOrZero()
|
||||
link.BondMaster.HashPolicy = bond.XmitHashPolicy().ValueOrZero()
|
||||
link.BondMaster.ARPInterval = bond.ARPInterval().ValueOrZero()
|
||||
link.BondMaster.ARPIPTargets = bond.ARPIPTargets()
|
||||
link.BondMaster.NSIP6Targets = bond.NSIP6Targets()
|
||||
link.BondMaster.ARPValidate = bond.ARPValidate().ValueOrZero()
|
||||
link.BondMaster.ARPAllTargets = bond.ARPAllTargets().ValueOrZero()
|
||||
link.BondMaster.LACPRate = bond.LACPRate().ValueOrZero()
|
||||
link.BondMaster.FailOverMac = bond.FailOverMAC().ValueOrZero()
|
||||
link.BondMaster.ADSelect = bond.ADSelect().ValueOrZero()
|
||||
link.BondMaster.ADActorSysPrio = bond.ADActorSysPrio().ValueOrZero()
|
||||
link.BondMaster.ADUserPortKey = bond.ADUserPortKey().ValueOrZero()
|
||||
link.BondMaster.ADLACPActive = bond.ADLACPActive().ValueOrZero()
|
||||
link.BondMaster.PrimaryReselect = bond.PrimaryReselect().ValueOrZero()
|
||||
link.BondMaster.ResendIGMP = bond.ResendIGMP().ValueOrZero()
|
||||
link.BondMaster.MinLinks = bond.MinLinks().ValueOrZero()
|
||||
link.BondMaster.LPInterval = bond.LPInterval().ValueOrZero()
|
||||
link.BondMaster.PacketsPerSlave = bond.PacketsPerSlave().ValueOrZero()
|
||||
link.BondMaster.NumPeerNotif = bond.NumPeerNotif().ValueOrZero()
|
||||
link.BondMaster.TLBDynamicLB = bond.TLBDynamicLB().ValueOrZero()
|
||||
link.BondMaster.AllSlavesActive = bond.AllSlavesActive().ValueOrZero()
|
||||
link.BondMaster.PeerNotifyDelay = bond.PeerNotifyDelay().ValueOrZero()
|
||||
link.BondMaster.MissedMax = bond.MissedMax().ValueOrZero()
|
||||
|
||||
networkadapter.BondMasterSpec(&link.BondMaster).FillDefaults()
|
||||
}
|
||||
|
||||
// SetBondMasterLegacy sets the bond master spec.
|
||||
//
|
||||
//nolint:gocyclo
|
||||
func SetBondMaster(link *network.LinkSpecSpec, bond talosconfig.Bond) error {
|
||||
func SetBondMasterLegacy(link *network.LinkSpecSpec, bond talosconfig.Bond) error {
|
||||
link.Logical = true
|
||||
link.Kind = network.LinkKindBond
|
||||
link.Type = nethelpers.LinkEther
|
||||
@ -91,7 +128,7 @@ func SetBondMaster(link *network.LinkSpecSpec, bond talosconfig.Bond) error {
|
||||
LACPRate: lacpRate,
|
||||
ARPValidate: arpValidate,
|
||||
ARPAllTargets: arpAllTargets,
|
||||
PrimaryIndex: primary,
|
||||
PrimaryIndex: pointer.To(primary),
|
||||
PrimaryReselect: primaryReselect,
|
||||
FailOverMac: failOverMAC,
|
||||
ADSelect: adSelect,
|
||||
|
||||
@ -75,6 +75,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
- name: bond1
|
||||
logical: true
|
||||
@ -99,6 +100,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
routes:
|
||||
- family: inet4
|
||||
|
||||
@ -58,6 +58,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
routes:
|
||||
- family: inet4
|
||||
|
||||
@ -50,6 +50,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
- name: bond0.2
|
||||
logical: true
|
||||
|
||||
@ -69,6 +69,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
- name: aggi
|
||||
logical: true
|
||||
@ -93,6 +94,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
routes:
|
||||
- family: inet4
|
||||
|
||||
@ -84,6 +84,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
- name: bond0.4
|
||||
logical: true
|
||||
|
||||
@ -53,6 +53,7 @@ links:
|
||||
numPeerNotif: 1
|
||||
tlbLogicalLb: 1
|
||||
adActorSysPrio: 65535
|
||||
missedMax: 2
|
||||
layer: platform
|
||||
- name: eth0
|
||||
logical: false
|
||||
|
||||
@ -12,12 +12,14 @@ import (
|
||||
"fmt"
|
||||
"math/rand/v2"
|
||||
"net/netip"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/resource"
|
||||
"github.com/cosi-project/runtime/pkg/resource/rtestutils"
|
||||
"github.com/cosi-project/runtime/pkg/safe"
|
||||
"github.com/siderolabs/gen/xslices"
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
@ -429,6 +431,101 @@ func (suite *NetworkConfigSuite) TestVLANConfig() {
|
||||
rtestutils.AssertNoResource[*networkres.RouteStatus](nodeCtx, suite.T(), suite.Client.COSI, routeID)
|
||||
}
|
||||
|
||||
// TestBondConfig tests creation of bond interfaces.
|
||||
func (suite *NetworkConfigSuite) TestBondConfig() {
|
||||
if suite.Cluster == nil {
|
||||
suite.T().Skip("skipping if cluster is not qemu/docker")
|
||||
}
|
||||
|
||||
node := suite.RandomDiscoveredNodeInternalIP(machine.TypeWorker)
|
||||
nodeCtx := client.WithNode(suite.ctx, node)
|
||||
|
||||
suite.T().Logf("testing on node %q", node)
|
||||
|
||||
dummyNames := xslices.Map([]int{0, 1}, func(int) string {
|
||||
return fmt.Sprintf("dummy%d", rand.IntN(10000))
|
||||
})
|
||||
|
||||
dummyConfigs := xslices.Map(dummyNames, func(name string) any {
|
||||
return network.NewDummyLinkConfigV1Alpha1(name)
|
||||
})
|
||||
|
||||
bondName := "agg." + strconv.Itoa(rand.IntN(10000))
|
||||
|
||||
bond := network.NewBondConfigV1Alpha1(bondName)
|
||||
bond.BondLinks = dummyNames
|
||||
bond.BondMode = pointer.To(nethelpers.BondMode8023AD)
|
||||
bond.BondMIIMon = pointer.To(uint32(100))
|
||||
bond.BondUpDelay = pointer.To(uint32(200))
|
||||
bond.BondDownDelay = pointer.To(uint32(300))
|
||||
bond.BondLACPRate = pointer.To(nethelpers.LACPRateSlow)
|
||||
bond.BondADActorSysPrio = pointer.To(uint16(65535))
|
||||
bond.BondResendIGMP = pointer.To(uint32(1))
|
||||
bond.BondPacketsPerSlave = pointer.To(uint32(1))
|
||||
bond.HardwareAddressConfig = nethelpers.HardwareAddr{0x02, 0x00, 0x00, 0x00, byte(rand.IntN(256)), byte(rand.IntN(256))}
|
||||
bond.LinkUp = pointer.To(true)
|
||||
bond.LinkMTU = 2000
|
||||
bond.LinkAddresses = []network.AddressConfig{
|
||||
{
|
||||
AddressAddress: netip.MustParsePrefix("fd13:1235::1/64"),
|
||||
AddressPriority: pointer.To[uint32](100),
|
||||
},
|
||||
}
|
||||
bond.LinkRoutes = []network.RouteConfig{
|
||||
{
|
||||
RouteDestination: network.Prefix{Prefix: netip.MustParsePrefix("fd13:1236::/64")},
|
||||
RouteGateway: network.Addr{Addr: netip.MustParseAddr("fd13:1235::ffff")},
|
||||
},
|
||||
}
|
||||
|
||||
addressID := bondName + "/fd13:1235::1/64"
|
||||
routeID := bondName + "/inet6/fd13:1235::ffff/fd13:1236::/64/1024"
|
||||
addressRouteID := bondName + "/inet6//fd13:1235::/64/100"
|
||||
|
||||
suite.PatchMachineConfig(nodeCtx, append(dummyConfigs, bond)...)
|
||||
|
||||
rtestutils.AssertResources(nodeCtx, suite.T(), suite.Client.COSI, dummyNames,
|
||||
func(link *networkres.LinkStatus, asrt *assert.Assertions) {
|
||||
asrt.Equal("dummy", link.TypedSpec().Kind)
|
||||
asrt.NotZero(link.TypedSpec().MasterIndex)
|
||||
},
|
||||
)
|
||||
|
||||
rtestutils.AssertResource(nodeCtx, suite.T(), suite.Client.COSI, bondName,
|
||||
func(link *networkres.LinkStatus, asrt *assert.Assertions) {
|
||||
asrt.Equal("bond", link.TypedSpec().Kind)
|
||||
asrt.Equal(bond.LinkMTU, link.TypedSpec().MTU)
|
||||
asrt.Equal(nethelpers.BondMode8023AD, link.TypedSpec().BondMaster.Mode)
|
||||
asrt.Equal(bond.HardwareAddressConfig, link.TypedSpec().HardwareAddr)
|
||||
},
|
||||
)
|
||||
|
||||
rtestutils.AssertResource(nodeCtx, suite.T(), suite.Client.COSI, addressID,
|
||||
func(addr *networkres.AddressStatus, asrt *assert.Assertions) {
|
||||
asrt.Equal(bondName, addr.TypedSpec().LinkName)
|
||||
},
|
||||
)
|
||||
|
||||
rtestutils.AssertResources(nodeCtx, suite.T(), suite.Client.COSI,
|
||||
[]resource.ID{routeID, addressRouteID},
|
||||
func(route *networkres.RouteStatus, asrt *assert.Assertions) {
|
||||
asrt.Equal(bondName, route.TypedSpec().OutLinkName)
|
||||
},
|
||||
)
|
||||
|
||||
suite.RemoveMachineConfigDocumentsByName(nodeCtx, network.BondKind, bondName)
|
||||
suite.RemoveMachineConfigDocumentsByName(nodeCtx, network.DummyLinkKind, dummyNames...)
|
||||
|
||||
for _, dummyName := range dummyNames {
|
||||
rtestutils.AssertNoResource[*networkres.LinkStatus](nodeCtx, suite.T(), suite.Client.COSI, dummyName)
|
||||
}
|
||||
|
||||
rtestutils.AssertNoResource[*networkres.LinkStatus](nodeCtx, suite.T(), suite.Client.COSI, bondName)
|
||||
rtestutils.AssertNoResource[*networkres.AddressStatus](nodeCtx, suite.T(), suite.Client.COSI, addressID)
|
||||
rtestutils.AssertNoResource[*networkres.RouteStatus](nodeCtx, suite.T(), suite.Client.COSI, addressRouteID)
|
||||
rtestutils.AssertNoResource[*networkres.RouteStatus](nodeCtx, suite.T(), suite.Client.COSI, routeID)
|
||||
}
|
||||
|
||||
func init() {
|
||||
allSuites = append(allSuites, new(NetworkConfigSuite))
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -280,6 +280,10 @@ type BondMasterSpec struct {
|
||||
AdActorSysPrio uint32 `protobuf:"varint,22,opt,name=ad_actor_sys_prio,json=adActorSysPrio,proto3" json:"ad_actor_sys_prio,omitempty"`
|
||||
AdUserPortKey uint32 `protobuf:"varint,23,opt,name=ad_user_port_key,json=adUserPortKey,proto3" json:"ad_user_port_key,omitempty"`
|
||||
PeerNotifyDelay uint32 `protobuf:"varint,24,opt,name=peer_notify_delay,json=peerNotifyDelay,proto3" json:"peer_notify_delay,omitempty"`
|
||||
ArpipTargets []*common.NetIP `protobuf:"bytes,25,rep,name=arpip_targets,json=arpipTargets,proto3" json:"arpip_targets,omitempty"`
|
||||
Nsip6Targets []*common.NetIP `protobuf:"bytes,26,rep,name=nsip6_targets,json=nsip6Targets,proto3" json:"nsip6_targets,omitempty"`
|
||||
AdlacpActive enums.NethelpersADLACPActive `protobuf:"varint,27,opt,name=adlacp_active,json=adlacpActive,proto3,enum=talos.resource.definitions.enums.NethelpersADLACPActive" json:"adlacp_active,omitempty"`
|
||||
MissedMax uint32 `protobuf:"varint,28,opt,name=missed_max,json=missedMax,proto3" json:"missed_max,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -482,6 +486,34 @@ func (x *BondMasterSpec) GetPeerNotifyDelay() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *BondMasterSpec) GetArpipTargets() []*common.NetIP {
|
||||
if x != nil {
|
||||
return x.ArpipTargets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BondMasterSpec) GetNsip6Targets() []*common.NetIP {
|
||||
if x != nil {
|
||||
return x.Nsip6Targets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BondMasterSpec) GetAdlacpActive() enums.NethelpersADLACPActive {
|
||||
if x != nil {
|
||||
return x.AdlacpActive
|
||||
}
|
||||
return enums.NethelpersADLACPActive(0)
|
||||
}
|
||||
|
||||
func (x *BondMasterSpec) GetMissedMax() uint32 {
|
||||
if x != nil {
|
||||
return x.MissedMax
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// BondSlave contains a bond's master name and slave index.
|
||||
type BondSlave struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@ -4673,8 +4705,7 @@ const file_resource_definitions_network_network_proto_rawDesc = "" +
|
||||
"\x05scope\x18\t \x01(\x0e21.talos.resource.definitions.enums.NethelpersScopeR\x05scope\x12\x14\n" +
|
||||
"\x05flags\x18\n" +
|
||||
" \x01(\rR\x05flags\x12\x1a\n" +
|
||||
"\bpriority\x18\v \x01(\rR\bpriority\"\xa4\n" +
|
||||
"\n" +
|
||||
"\bpriority\x18\v \x01(\rR\bpriority\"\x8a\f\n" +
|
||||
"\x0eBondMasterSpec\x12H\n" +
|
||||
"\x04mode\x18\x01 \x01(\x0e24.talos.resource.definitions.enums.NethelpersBondModeR\x04mode\x12_\n" +
|
||||
"\vhash_policy\x18\x02 \x01(\x0e2>.talos.resource.definitions.enums.NethelpersBondXmitHashPolicyR\n" +
|
||||
@ -4705,7 +4736,12 @@ const file_resource_definitions_network_network_proto_rawDesc = "" +
|
||||
"useCarrier\x12)\n" +
|
||||
"\x11ad_actor_sys_prio\x18\x16 \x01(\rR\x0eadActorSysPrio\x12'\n" +
|
||||
"\x10ad_user_port_key\x18\x17 \x01(\rR\radUserPortKey\x12*\n" +
|
||||
"\x11peer_notify_delay\x18\x18 \x01(\rR\x0fpeerNotifyDelay\"M\n" +
|
||||
"\x11peer_notify_delay\x18\x18 \x01(\rR\x0fpeerNotifyDelay\x122\n" +
|
||||
"\rarpip_targets\x18\x19 \x03(\v2\r.common.NetIPR\farpipTargets\x122\n" +
|
||||
"\rnsip6_targets\x18\x1a \x03(\v2\r.common.NetIPR\fnsip6Targets\x12]\n" +
|
||||
"\radlacp_active\x18\x1b \x01(\x0e28.talos.resource.definitions.enums.NethelpersADLACPActiveR\fadlacpActive\x12\x1d\n" +
|
||||
"\n" +
|
||||
"missed_max\x18\x1c \x01(\rR\tmissedMax\"M\n" +
|
||||
"\tBondSlave\x12\x1f\n" +
|
||||
"\vmaster_name\x18\x01 \x01(\tR\n" +
|
||||
"masterName\x12\x1f\n" +
|
||||
@ -5161,28 +5197,29 @@ var file_resource_definitions_network_network_proto_goTypes = []any{
|
||||
(enums.NethelpersPrimaryReselect)(0), // 71: talos.resource.definitions.enums.NethelpersPrimaryReselect
|
||||
(enums.NethelpersFailOverMAC)(0), // 72: talos.resource.definitions.enums.NethelpersFailOverMAC
|
||||
(enums.NethelpersADSelect)(0), // 73: talos.resource.definitions.enums.NethelpersADSelect
|
||||
(enums.NethelpersClientIdentifier)(0), // 74: talos.resource.definitions.enums.NethelpersClientIdentifier
|
||||
(enums.NethelpersWOLMode)(0), // 75: talos.resource.definitions.enums.NethelpersWOLMode
|
||||
(enums.NethelpersPort)(0), // 76: talos.resource.definitions.enums.NethelpersPort
|
||||
(enums.NethelpersDuplex)(0), // 77: talos.resource.definitions.enums.NethelpersDuplex
|
||||
(*common.NetIPPort)(nil), // 78: common.NetIPPort
|
||||
(enums.NethelpersLinkType)(0), // 79: talos.resource.definitions.enums.NethelpersLinkType
|
||||
(enums.NethelpersOperationalState)(0), // 80: talos.resource.definitions.enums.NethelpersOperationalState
|
||||
(enums.NethelpersNfTablesChainHook)(0), // 81: talos.resource.definitions.enums.NethelpersNfTablesChainHook
|
||||
(enums.NethelpersNfTablesChainPriority)(0), // 82: talos.resource.definitions.enums.NethelpersNfTablesChainPriority
|
||||
(enums.NethelpersNfTablesVerdict)(0), // 83: talos.resource.definitions.enums.NethelpersNfTablesVerdict
|
||||
(enums.NethelpersConntrackState)(0), // 84: talos.resource.definitions.enums.NethelpersConntrackState
|
||||
(enums.NethelpersICMPType)(0), // 85: talos.resource.definitions.enums.NethelpersICMPType
|
||||
(enums.NethelpersMatchOperator)(0), // 86: talos.resource.definitions.enums.NethelpersMatchOperator
|
||||
(enums.NethelpersProtocol)(0), // 87: talos.resource.definitions.enums.NethelpersProtocol
|
||||
(enums.NethelpersAddressSortAlgorithm)(0), // 88: talos.resource.definitions.enums.NethelpersAddressSortAlgorithm
|
||||
(enums.NetworkOperator)(0), // 89: talos.resource.definitions.enums.NetworkOperator
|
||||
(*runtime.PlatformMetadataSpec)(nil), // 90: talos.resource.definitions.runtime.PlatformMetadataSpec
|
||||
(*durationpb.Duration)(nil), // 91: google.protobuf.Duration
|
||||
(enums.NethelpersRoutingTable)(0), // 92: talos.resource.definitions.enums.NethelpersRoutingTable
|
||||
(enums.NethelpersRouteType)(0), // 93: talos.resource.definitions.enums.NethelpersRouteType
|
||||
(enums.NethelpersRouteProtocol)(0), // 94: talos.resource.definitions.enums.NethelpersRouteProtocol
|
||||
(enums.NethelpersVLANProtocol)(0), // 95: talos.resource.definitions.enums.NethelpersVLANProtocol
|
||||
(enums.NethelpersADLACPActive)(0), // 74: talos.resource.definitions.enums.NethelpersADLACPActive
|
||||
(enums.NethelpersClientIdentifier)(0), // 75: talos.resource.definitions.enums.NethelpersClientIdentifier
|
||||
(enums.NethelpersWOLMode)(0), // 76: talos.resource.definitions.enums.NethelpersWOLMode
|
||||
(enums.NethelpersPort)(0), // 77: talos.resource.definitions.enums.NethelpersPort
|
||||
(enums.NethelpersDuplex)(0), // 78: talos.resource.definitions.enums.NethelpersDuplex
|
||||
(*common.NetIPPort)(nil), // 79: common.NetIPPort
|
||||
(enums.NethelpersLinkType)(0), // 80: talos.resource.definitions.enums.NethelpersLinkType
|
||||
(enums.NethelpersOperationalState)(0), // 81: talos.resource.definitions.enums.NethelpersOperationalState
|
||||
(enums.NethelpersNfTablesChainHook)(0), // 82: talos.resource.definitions.enums.NethelpersNfTablesChainHook
|
||||
(enums.NethelpersNfTablesChainPriority)(0), // 83: talos.resource.definitions.enums.NethelpersNfTablesChainPriority
|
||||
(enums.NethelpersNfTablesVerdict)(0), // 84: talos.resource.definitions.enums.NethelpersNfTablesVerdict
|
||||
(enums.NethelpersConntrackState)(0), // 85: talos.resource.definitions.enums.NethelpersConntrackState
|
||||
(enums.NethelpersICMPType)(0), // 86: talos.resource.definitions.enums.NethelpersICMPType
|
||||
(enums.NethelpersMatchOperator)(0), // 87: talos.resource.definitions.enums.NethelpersMatchOperator
|
||||
(enums.NethelpersProtocol)(0), // 88: talos.resource.definitions.enums.NethelpersProtocol
|
||||
(enums.NethelpersAddressSortAlgorithm)(0), // 89: talos.resource.definitions.enums.NethelpersAddressSortAlgorithm
|
||||
(enums.NetworkOperator)(0), // 90: talos.resource.definitions.enums.NetworkOperator
|
||||
(*runtime.PlatformMetadataSpec)(nil), // 91: talos.resource.definitions.runtime.PlatformMetadataSpec
|
||||
(*durationpb.Duration)(nil), // 92: google.protobuf.Duration
|
||||
(enums.NethelpersRoutingTable)(0), // 93: talos.resource.definitions.enums.NethelpersRoutingTable
|
||||
(enums.NethelpersRouteType)(0), // 94: talos.resource.definitions.enums.NethelpersRouteType
|
||||
(enums.NethelpersRouteProtocol)(0), // 95: talos.resource.definitions.enums.NethelpersRouteProtocol
|
||||
(enums.NethelpersVLANProtocol)(0), // 96: talos.resource.definitions.enums.NethelpersVLANProtocol
|
||||
}
|
||||
var file_resource_definitions_network_network_proto_depIdxs = []int32{
|
||||
61, // 0: talos.resource.definitions.network.AddressSpecSpec.address:type_name -> common.NetIPPrefix
|
||||
@ -5204,122 +5241,125 @@ var file_resource_definitions_network_network_proto_depIdxs = []int32{
|
||||
71, // 16: talos.resource.definitions.network.BondMasterSpec.primary_reselect:type_name -> talos.resource.definitions.enums.NethelpersPrimaryReselect
|
||||
72, // 17: talos.resource.definitions.network.BondMasterSpec.fail_over_mac:type_name -> talos.resource.definitions.enums.NethelpersFailOverMAC
|
||||
73, // 18: talos.resource.definitions.network.BondMasterSpec.ad_select:type_name -> talos.resource.definitions.enums.NethelpersADSelect
|
||||
49, // 19: talos.resource.definitions.network.BridgeMasterSpec.stp:type_name -> talos.resource.definitions.network.STPSpec
|
||||
6, // 20: talos.resource.definitions.network.BridgeMasterSpec.vlan:type_name -> talos.resource.definitions.network.BridgeVLANSpec
|
||||
74, // 21: talos.resource.definitions.network.ClientIdentifierSpec.client_identifier:type_name -> talos.resource.definitions.enums.NethelpersClientIdentifier
|
||||
7, // 22: talos.resource.definitions.network.DHCP4OperatorSpec.client_identifier:type_name -> talos.resource.definitions.network.ClientIdentifierSpec
|
||||
7, // 23: talos.resource.definitions.network.DHCP6OperatorSpec.client_identifier:type_name -> talos.resource.definitions.network.ClientIdentifierSpec
|
||||
14, // 24: talos.resource.definitions.network.EthernetSpecSpec.rings:type_name -> talos.resource.definitions.network.EthernetRingsSpec
|
||||
60, // 25: talos.resource.definitions.network.EthernetSpecSpec.features:type_name -> talos.resource.definitions.network.EthernetSpecSpec.FeaturesEntry
|
||||
11, // 26: talos.resource.definitions.network.EthernetSpecSpec.channels:type_name -> talos.resource.definitions.network.EthernetChannelsSpec
|
||||
75, // 27: talos.resource.definitions.network.EthernetSpecSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode
|
||||
76, // 28: talos.resource.definitions.network.EthernetStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort
|
||||
77, // 29: talos.resource.definitions.network.EthernetStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex
|
||||
15, // 30: talos.resource.definitions.network.EthernetStatusSpec.rings:type_name -> talos.resource.definitions.network.EthernetRingsStatus
|
||||
13, // 31: talos.resource.definitions.network.EthernetStatusSpec.features:type_name -> talos.resource.definitions.network.EthernetFeatureStatus
|
||||
12, // 32: talos.resource.definitions.network.EthernetStatusSpec.channels:type_name -> talos.resource.definitions.network.EthernetChannelsStatus
|
||||
75, // 33: talos.resource.definitions.network.EthernetStatusSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode
|
||||
78, // 34: talos.resource.definitions.network.HostDNSConfigSpec.listen_addresses:type_name -> common.NetIPPort
|
||||
65, // 35: talos.resource.definitions.network.HostDNSConfigSpec.service_host_dns_address:type_name -> common.NetIP
|
||||
64, // 36: talos.resource.definitions.network.HostnameSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
79, // 37: talos.resource.definitions.network.LinkSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType
|
||||
3, // 38: talos.resource.definitions.network.LinkSpecSpec.bond_slave:type_name -> talos.resource.definitions.network.BondSlave
|
||||
5, // 39: talos.resource.definitions.network.LinkSpecSpec.bridge_slave:type_name -> talos.resource.definitions.network.BridgeSlave
|
||||
57, // 40: talos.resource.definitions.network.LinkSpecSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec
|
||||
2, // 41: talos.resource.definitions.network.LinkSpecSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec
|
||||
4, // 42: talos.resource.definitions.network.LinkSpecSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec
|
||||
59, // 43: talos.resource.definitions.network.LinkSpecSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec
|
||||
64, // 44: talos.resource.definitions.network.LinkSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
79, // 45: talos.resource.definitions.network.LinkStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType
|
||||
80, // 46: talos.resource.definitions.network.LinkStatusSpec.operational_state:type_name -> talos.resource.definitions.enums.NethelpersOperationalState
|
||||
76, // 47: talos.resource.definitions.network.LinkStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort
|
||||
77, // 48: talos.resource.definitions.network.LinkStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex
|
||||
57, // 49: talos.resource.definitions.network.LinkStatusSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec
|
||||
4, // 50: talos.resource.definitions.network.LinkStatusSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec
|
||||
2, // 51: talos.resource.definitions.network.LinkStatusSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec
|
||||
59, // 52: talos.resource.definitions.network.LinkStatusSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec
|
||||
61, // 53: talos.resource.definitions.network.NfTablesAddressMatch.include_subnets:type_name -> common.NetIPPrefix
|
||||
61, // 54: talos.resource.definitions.network.NfTablesAddressMatch.exclude_subnets:type_name -> common.NetIPPrefix
|
||||
81, // 55: talos.resource.definitions.network.NfTablesChainSpec.hook:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainHook
|
||||
82, // 56: talos.resource.definitions.network.NfTablesChainSpec.priority:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainPriority
|
||||
36, // 57: talos.resource.definitions.network.NfTablesChainSpec.rules:type_name -> talos.resource.definitions.network.NfTablesRule
|
||||
83, // 58: talos.resource.definitions.network.NfTablesChainSpec.policy:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict
|
||||
84, // 59: talos.resource.definitions.network.NfTablesConntrackStateMatch.states:type_name -> talos.resource.definitions.enums.NethelpersConntrackState
|
||||
85, // 60: talos.resource.definitions.network.NfTablesICMPTypeMatch.types:type_name -> talos.resource.definitions.enums.NethelpersICMPType
|
||||
86, // 61: talos.resource.definitions.network.NfTablesIfNameMatch.operator:type_name -> talos.resource.definitions.enums.NethelpersMatchOperator
|
||||
87, // 62: talos.resource.definitions.network.NfTablesLayer4Match.protocol:type_name -> talos.resource.definitions.enums.NethelpersProtocol
|
||||
35, // 63: talos.resource.definitions.network.NfTablesLayer4Match.match_source_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch
|
||||
35, // 64: talos.resource.definitions.network.NfTablesLayer4Match.match_destination_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch
|
||||
30, // 65: talos.resource.definitions.network.NfTablesLayer4Match.match_icmp_type:type_name -> talos.resource.definitions.network.NfTablesICMPTypeMatch
|
||||
42, // 66: talos.resource.definitions.network.NfTablesPortMatch.ranges:type_name -> talos.resource.definitions.network.PortRange
|
||||
31, // 67: talos.resource.definitions.network.NfTablesRule.match_o_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch
|
||||
83, // 68: talos.resource.definitions.network.NfTablesRule.verdict:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict
|
||||
34, // 69: talos.resource.definitions.network.NfTablesRule.match_mark:type_name -> talos.resource.definitions.network.NfTablesMark
|
||||
34, // 70: talos.resource.definitions.network.NfTablesRule.set_mark:type_name -> talos.resource.definitions.network.NfTablesMark
|
||||
26, // 71: talos.resource.definitions.network.NfTablesRule.match_source_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch
|
||||
26, // 72: talos.resource.definitions.network.NfTablesRule.match_destination_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch
|
||||
32, // 73: talos.resource.definitions.network.NfTablesRule.match_layer4:type_name -> talos.resource.definitions.network.NfTablesLayer4Match
|
||||
31, // 74: talos.resource.definitions.network.NfTablesRule.match_i_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch
|
||||
28, // 75: talos.resource.definitions.network.NfTablesRule.clamp_mss:type_name -> talos.resource.definitions.network.NfTablesClampMSS
|
||||
33, // 76: talos.resource.definitions.network.NfTablesRule.match_limit:type_name -> talos.resource.definitions.network.NfTablesLimitMatch
|
||||
29, // 77: talos.resource.definitions.network.NfTablesRule.match_conntrack_state:type_name -> talos.resource.definitions.network.NfTablesConntrackStateMatch
|
||||
61, // 78: talos.resource.definitions.network.NodeAddressFilterSpec.include_subnets:type_name -> common.NetIPPrefix
|
||||
61, // 79: talos.resource.definitions.network.NodeAddressFilterSpec.exclude_subnets:type_name -> common.NetIPPrefix
|
||||
88, // 80: talos.resource.definitions.network.NodeAddressSortAlgorithmSpec.algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm
|
||||
61, // 81: talos.resource.definitions.network.NodeAddressSpec.addresses:type_name -> common.NetIPPrefix
|
||||
88, // 82: talos.resource.definitions.network.NodeAddressSpec.sort_algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm
|
||||
89, // 83: talos.resource.definitions.network.OperatorSpecSpec.operator:type_name -> talos.resource.definitions.enums.NetworkOperator
|
||||
8, // 84: talos.resource.definitions.network.OperatorSpecSpec.dhcp4:type_name -> talos.resource.definitions.network.DHCP4OperatorSpec
|
||||
9, // 85: talos.resource.definitions.network.OperatorSpecSpec.dhcp6:type_name -> talos.resource.definitions.network.DHCP6OperatorSpec
|
||||
56, // 86: talos.resource.definitions.network.OperatorSpecSpec.vip:type_name -> talos.resource.definitions.network.VIPOperatorSpec
|
||||
64, // 87: talos.resource.definitions.network.OperatorSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
0, // 88: talos.resource.definitions.network.PlatformConfigSpec.addresses:type_name -> talos.resource.definitions.network.AddressSpecSpec
|
||||
24, // 89: talos.resource.definitions.network.PlatformConfigSpec.links:type_name -> talos.resource.definitions.network.LinkSpecSpec
|
||||
47, // 90: talos.resource.definitions.network.PlatformConfigSpec.routes:type_name -> talos.resource.definitions.network.RouteSpecSpec
|
||||
20, // 91: talos.resource.definitions.network.PlatformConfigSpec.hostnames:type_name -> talos.resource.definitions.network.HostnameSpecSpec
|
||||
45, // 92: talos.resource.definitions.network.PlatformConfigSpec.resolvers:type_name -> talos.resource.definitions.network.ResolverSpecSpec
|
||||
52, // 93: talos.resource.definitions.network.PlatformConfigSpec.time_servers:type_name -> talos.resource.definitions.network.TimeServerSpecSpec
|
||||
40, // 94: talos.resource.definitions.network.PlatformConfigSpec.operators:type_name -> talos.resource.definitions.network.OperatorSpecSpec
|
||||
65, // 95: talos.resource.definitions.network.PlatformConfigSpec.external_ips:type_name -> common.NetIP
|
||||
43, // 96: talos.resource.definitions.network.PlatformConfigSpec.probes:type_name -> talos.resource.definitions.network.ProbeSpecSpec
|
||||
90, // 97: talos.resource.definitions.network.PlatformConfigSpec.metadata:type_name -> talos.resource.definitions.runtime.PlatformMetadataSpec
|
||||
91, // 98: talos.resource.definitions.network.ProbeSpecSpec.interval:type_name -> google.protobuf.Duration
|
||||
51, // 99: talos.resource.definitions.network.ProbeSpecSpec.tcp:type_name -> talos.resource.definitions.network.TCPProbeSpec
|
||||
64, // 100: talos.resource.definitions.network.ProbeSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
65, // 101: talos.resource.definitions.network.ResolverSpecSpec.dns_servers:type_name -> common.NetIP
|
||||
64, // 102: talos.resource.definitions.network.ResolverSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
65, // 103: talos.resource.definitions.network.ResolverStatusSpec.dns_servers:type_name -> common.NetIP
|
||||
62, // 104: talos.resource.definitions.network.RouteSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily
|
||||
61, // 105: talos.resource.definitions.network.RouteSpecSpec.destination:type_name -> common.NetIPPrefix
|
||||
65, // 106: talos.resource.definitions.network.RouteSpecSpec.source:type_name -> common.NetIP
|
||||
65, // 107: talos.resource.definitions.network.RouteSpecSpec.gateway:type_name -> common.NetIP
|
||||
92, // 108: talos.resource.definitions.network.RouteSpecSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable
|
||||
63, // 109: talos.resource.definitions.network.RouteSpecSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope
|
||||
93, // 110: talos.resource.definitions.network.RouteSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType
|
||||
94, // 111: talos.resource.definitions.network.RouteSpecSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol
|
||||
64, // 112: talos.resource.definitions.network.RouteSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
62, // 113: talos.resource.definitions.network.RouteStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily
|
||||
61, // 114: talos.resource.definitions.network.RouteStatusSpec.destination:type_name -> common.NetIPPrefix
|
||||
65, // 115: talos.resource.definitions.network.RouteStatusSpec.source:type_name -> common.NetIP
|
||||
65, // 116: talos.resource.definitions.network.RouteStatusSpec.gateway:type_name -> common.NetIP
|
||||
92, // 117: talos.resource.definitions.network.RouteStatusSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable
|
||||
63, // 118: talos.resource.definitions.network.RouteStatusSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope
|
||||
93, // 119: talos.resource.definitions.network.RouteStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType
|
||||
94, // 120: talos.resource.definitions.network.RouteStatusSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol
|
||||
91, // 121: talos.resource.definitions.network.TCPProbeSpec.timeout:type_name -> google.protobuf.Duration
|
||||
64, // 122: talos.resource.definitions.network.TimeServerSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
65, // 123: talos.resource.definitions.network.VIPOperatorSpec.ip:type_name -> common.NetIP
|
||||
54, // 124: talos.resource.definitions.network.VIPOperatorSpec.equinix_metal:type_name -> talos.resource.definitions.network.VIPEquinixMetalSpec
|
||||
55, // 125: talos.resource.definitions.network.VIPOperatorSpec.h_cloud:type_name -> talos.resource.definitions.network.VIPHCloudSpec
|
||||
95, // 126: talos.resource.definitions.network.VLANSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersVLANProtocol
|
||||
91, // 127: talos.resource.definitions.network.WireguardPeer.persistent_keepalive_interval:type_name -> google.protobuf.Duration
|
||||
61, // 128: talos.resource.definitions.network.WireguardPeer.allowed_ips:type_name -> common.NetIPPrefix
|
||||
58, // 129: talos.resource.definitions.network.WireguardSpec.peers:type_name -> talos.resource.definitions.network.WireguardPeer
|
||||
130, // [130:130] is the sub-list for method output_type
|
||||
130, // [130:130] is the sub-list for method input_type
|
||||
130, // [130:130] is the sub-list for extension type_name
|
||||
130, // [130:130] is the sub-list for extension extendee
|
||||
0, // [0:130] is the sub-list for field type_name
|
||||
65, // 19: talos.resource.definitions.network.BondMasterSpec.arpip_targets:type_name -> common.NetIP
|
||||
65, // 20: talos.resource.definitions.network.BondMasterSpec.nsip6_targets:type_name -> common.NetIP
|
||||
74, // 21: talos.resource.definitions.network.BondMasterSpec.adlacp_active:type_name -> talos.resource.definitions.enums.NethelpersADLACPActive
|
||||
49, // 22: talos.resource.definitions.network.BridgeMasterSpec.stp:type_name -> talos.resource.definitions.network.STPSpec
|
||||
6, // 23: talos.resource.definitions.network.BridgeMasterSpec.vlan:type_name -> talos.resource.definitions.network.BridgeVLANSpec
|
||||
75, // 24: talos.resource.definitions.network.ClientIdentifierSpec.client_identifier:type_name -> talos.resource.definitions.enums.NethelpersClientIdentifier
|
||||
7, // 25: talos.resource.definitions.network.DHCP4OperatorSpec.client_identifier:type_name -> talos.resource.definitions.network.ClientIdentifierSpec
|
||||
7, // 26: talos.resource.definitions.network.DHCP6OperatorSpec.client_identifier:type_name -> talos.resource.definitions.network.ClientIdentifierSpec
|
||||
14, // 27: talos.resource.definitions.network.EthernetSpecSpec.rings:type_name -> talos.resource.definitions.network.EthernetRingsSpec
|
||||
60, // 28: talos.resource.definitions.network.EthernetSpecSpec.features:type_name -> talos.resource.definitions.network.EthernetSpecSpec.FeaturesEntry
|
||||
11, // 29: talos.resource.definitions.network.EthernetSpecSpec.channels:type_name -> talos.resource.definitions.network.EthernetChannelsSpec
|
||||
76, // 30: talos.resource.definitions.network.EthernetSpecSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode
|
||||
77, // 31: talos.resource.definitions.network.EthernetStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort
|
||||
78, // 32: talos.resource.definitions.network.EthernetStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex
|
||||
15, // 33: talos.resource.definitions.network.EthernetStatusSpec.rings:type_name -> talos.resource.definitions.network.EthernetRingsStatus
|
||||
13, // 34: talos.resource.definitions.network.EthernetStatusSpec.features:type_name -> talos.resource.definitions.network.EthernetFeatureStatus
|
||||
12, // 35: talos.resource.definitions.network.EthernetStatusSpec.channels:type_name -> talos.resource.definitions.network.EthernetChannelsStatus
|
||||
76, // 36: talos.resource.definitions.network.EthernetStatusSpec.wake_on_lan:type_name -> talos.resource.definitions.enums.NethelpersWOLMode
|
||||
79, // 37: talos.resource.definitions.network.HostDNSConfigSpec.listen_addresses:type_name -> common.NetIPPort
|
||||
65, // 38: talos.resource.definitions.network.HostDNSConfigSpec.service_host_dns_address:type_name -> common.NetIP
|
||||
64, // 39: talos.resource.definitions.network.HostnameSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
80, // 40: talos.resource.definitions.network.LinkSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType
|
||||
3, // 41: talos.resource.definitions.network.LinkSpecSpec.bond_slave:type_name -> talos.resource.definitions.network.BondSlave
|
||||
5, // 42: talos.resource.definitions.network.LinkSpecSpec.bridge_slave:type_name -> talos.resource.definitions.network.BridgeSlave
|
||||
57, // 43: talos.resource.definitions.network.LinkSpecSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec
|
||||
2, // 44: talos.resource.definitions.network.LinkSpecSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec
|
||||
4, // 45: talos.resource.definitions.network.LinkSpecSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec
|
||||
59, // 46: talos.resource.definitions.network.LinkSpecSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec
|
||||
64, // 47: talos.resource.definitions.network.LinkSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
80, // 48: talos.resource.definitions.network.LinkStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersLinkType
|
||||
81, // 49: talos.resource.definitions.network.LinkStatusSpec.operational_state:type_name -> talos.resource.definitions.enums.NethelpersOperationalState
|
||||
77, // 50: talos.resource.definitions.network.LinkStatusSpec.port:type_name -> talos.resource.definitions.enums.NethelpersPort
|
||||
78, // 51: talos.resource.definitions.network.LinkStatusSpec.duplex:type_name -> talos.resource.definitions.enums.NethelpersDuplex
|
||||
57, // 52: talos.resource.definitions.network.LinkStatusSpec.vlan:type_name -> talos.resource.definitions.network.VLANSpec
|
||||
4, // 53: talos.resource.definitions.network.LinkStatusSpec.bridge_master:type_name -> talos.resource.definitions.network.BridgeMasterSpec
|
||||
2, // 54: talos.resource.definitions.network.LinkStatusSpec.bond_master:type_name -> talos.resource.definitions.network.BondMasterSpec
|
||||
59, // 55: talos.resource.definitions.network.LinkStatusSpec.wireguard:type_name -> talos.resource.definitions.network.WireguardSpec
|
||||
61, // 56: talos.resource.definitions.network.NfTablesAddressMatch.include_subnets:type_name -> common.NetIPPrefix
|
||||
61, // 57: talos.resource.definitions.network.NfTablesAddressMatch.exclude_subnets:type_name -> common.NetIPPrefix
|
||||
82, // 58: talos.resource.definitions.network.NfTablesChainSpec.hook:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainHook
|
||||
83, // 59: talos.resource.definitions.network.NfTablesChainSpec.priority:type_name -> talos.resource.definitions.enums.NethelpersNfTablesChainPriority
|
||||
36, // 60: talos.resource.definitions.network.NfTablesChainSpec.rules:type_name -> talos.resource.definitions.network.NfTablesRule
|
||||
84, // 61: talos.resource.definitions.network.NfTablesChainSpec.policy:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict
|
||||
85, // 62: talos.resource.definitions.network.NfTablesConntrackStateMatch.states:type_name -> talos.resource.definitions.enums.NethelpersConntrackState
|
||||
86, // 63: talos.resource.definitions.network.NfTablesICMPTypeMatch.types:type_name -> talos.resource.definitions.enums.NethelpersICMPType
|
||||
87, // 64: talos.resource.definitions.network.NfTablesIfNameMatch.operator:type_name -> talos.resource.definitions.enums.NethelpersMatchOperator
|
||||
88, // 65: talos.resource.definitions.network.NfTablesLayer4Match.protocol:type_name -> talos.resource.definitions.enums.NethelpersProtocol
|
||||
35, // 66: talos.resource.definitions.network.NfTablesLayer4Match.match_source_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch
|
||||
35, // 67: talos.resource.definitions.network.NfTablesLayer4Match.match_destination_port:type_name -> talos.resource.definitions.network.NfTablesPortMatch
|
||||
30, // 68: talos.resource.definitions.network.NfTablesLayer4Match.match_icmp_type:type_name -> talos.resource.definitions.network.NfTablesICMPTypeMatch
|
||||
42, // 69: talos.resource.definitions.network.NfTablesPortMatch.ranges:type_name -> talos.resource.definitions.network.PortRange
|
||||
31, // 70: talos.resource.definitions.network.NfTablesRule.match_o_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch
|
||||
84, // 71: talos.resource.definitions.network.NfTablesRule.verdict:type_name -> talos.resource.definitions.enums.NethelpersNfTablesVerdict
|
||||
34, // 72: talos.resource.definitions.network.NfTablesRule.match_mark:type_name -> talos.resource.definitions.network.NfTablesMark
|
||||
34, // 73: talos.resource.definitions.network.NfTablesRule.set_mark:type_name -> talos.resource.definitions.network.NfTablesMark
|
||||
26, // 74: talos.resource.definitions.network.NfTablesRule.match_source_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch
|
||||
26, // 75: talos.resource.definitions.network.NfTablesRule.match_destination_address:type_name -> talos.resource.definitions.network.NfTablesAddressMatch
|
||||
32, // 76: talos.resource.definitions.network.NfTablesRule.match_layer4:type_name -> talos.resource.definitions.network.NfTablesLayer4Match
|
||||
31, // 77: talos.resource.definitions.network.NfTablesRule.match_i_if_name:type_name -> talos.resource.definitions.network.NfTablesIfNameMatch
|
||||
28, // 78: talos.resource.definitions.network.NfTablesRule.clamp_mss:type_name -> talos.resource.definitions.network.NfTablesClampMSS
|
||||
33, // 79: talos.resource.definitions.network.NfTablesRule.match_limit:type_name -> talos.resource.definitions.network.NfTablesLimitMatch
|
||||
29, // 80: talos.resource.definitions.network.NfTablesRule.match_conntrack_state:type_name -> talos.resource.definitions.network.NfTablesConntrackStateMatch
|
||||
61, // 81: talos.resource.definitions.network.NodeAddressFilterSpec.include_subnets:type_name -> common.NetIPPrefix
|
||||
61, // 82: talos.resource.definitions.network.NodeAddressFilterSpec.exclude_subnets:type_name -> common.NetIPPrefix
|
||||
89, // 83: talos.resource.definitions.network.NodeAddressSortAlgorithmSpec.algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm
|
||||
61, // 84: talos.resource.definitions.network.NodeAddressSpec.addresses:type_name -> common.NetIPPrefix
|
||||
89, // 85: talos.resource.definitions.network.NodeAddressSpec.sort_algorithm:type_name -> talos.resource.definitions.enums.NethelpersAddressSortAlgorithm
|
||||
90, // 86: talos.resource.definitions.network.OperatorSpecSpec.operator:type_name -> talos.resource.definitions.enums.NetworkOperator
|
||||
8, // 87: talos.resource.definitions.network.OperatorSpecSpec.dhcp4:type_name -> talos.resource.definitions.network.DHCP4OperatorSpec
|
||||
9, // 88: talos.resource.definitions.network.OperatorSpecSpec.dhcp6:type_name -> talos.resource.definitions.network.DHCP6OperatorSpec
|
||||
56, // 89: talos.resource.definitions.network.OperatorSpecSpec.vip:type_name -> talos.resource.definitions.network.VIPOperatorSpec
|
||||
64, // 90: talos.resource.definitions.network.OperatorSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
0, // 91: talos.resource.definitions.network.PlatformConfigSpec.addresses:type_name -> talos.resource.definitions.network.AddressSpecSpec
|
||||
24, // 92: talos.resource.definitions.network.PlatformConfigSpec.links:type_name -> talos.resource.definitions.network.LinkSpecSpec
|
||||
47, // 93: talos.resource.definitions.network.PlatformConfigSpec.routes:type_name -> talos.resource.definitions.network.RouteSpecSpec
|
||||
20, // 94: talos.resource.definitions.network.PlatformConfigSpec.hostnames:type_name -> talos.resource.definitions.network.HostnameSpecSpec
|
||||
45, // 95: talos.resource.definitions.network.PlatformConfigSpec.resolvers:type_name -> talos.resource.definitions.network.ResolverSpecSpec
|
||||
52, // 96: talos.resource.definitions.network.PlatformConfigSpec.time_servers:type_name -> talos.resource.definitions.network.TimeServerSpecSpec
|
||||
40, // 97: talos.resource.definitions.network.PlatformConfigSpec.operators:type_name -> talos.resource.definitions.network.OperatorSpecSpec
|
||||
65, // 98: talos.resource.definitions.network.PlatformConfigSpec.external_ips:type_name -> common.NetIP
|
||||
43, // 99: talos.resource.definitions.network.PlatformConfigSpec.probes:type_name -> talos.resource.definitions.network.ProbeSpecSpec
|
||||
91, // 100: talos.resource.definitions.network.PlatformConfigSpec.metadata:type_name -> talos.resource.definitions.runtime.PlatformMetadataSpec
|
||||
92, // 101: talos.resource.definitions.network.ProbeSpecSpec.interval:type_name -> google.protobuf.Duration
|
||||
51, // 102: talos.resource.definitions.network.ProbeSpecSpec.tcp:type_name -> talos.resource.definitions.network.TCPProbeSpec
|
||||
64, // 103: talos.resource.definitions.network.ProbeSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
65, // 104: talos.resource.definitions.network.ResolverSpecSpec.dns_servers:type_name -> common.NetIP
|
||||
64, // 105: talos.resource.definitions.network.ResolverSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
65, // 106: talos.resource.definitions.network.ResolverStatusSpec.dns_servers:type_name -> common.NetIP
|
||||
62, // 107: talos.resource.definitions.network.RouteSpecSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily
|
||||
61, // 108: talos.resource.definitions.network.RouteSpecSpec.destination:type_name -> common.NetIPPrefix
|
||||
65, // 109: talos.resource.definitions.network.RouteSpecSpec.source:type_name -> common.NetIP
|
||||
65, // 110: talos.resource.definitions.network.RouteSpecSpec.gateway:type_name -> common.NetIP
|
||||
93, // 111: talos.resource.definitions.network.RouteSpecSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable
|
||||
63, // 112: talos.resource.definitions.network.RouteSpecSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope
|
||||
94, // 113: talos.resource.definitions.network.RouteSpecSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType
|
||||
95, // 114: talos.resource.definitions.network.RouteSpecSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol
|
||||
64, // 115: talos.resource.definitions.network.RouteSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
62, // 116: talos.resource.definitions.network.RouteStatusSpec.family:type_name -> talos.resource.definitions.enums.NethelpersFamily
|
||||
61, // 117: talos.resource.definitions.network.RouteStatusSpec.destination:type_name -> common.NetIPPrefix
|
||||
65, // 118: talos.resource.definitions.network.RouteStatusSpec.source:type_name -> common.NetIP
|
||||
65, // 119: talos.resource.definitions.network.RouteStatusSpec.gateway:type_name -> common.NetIP
|
||||
93, // 120: talos.resource.definitions.network.RouteStatusSpec.table:type_name -> talos.resource.definitions.enums.NethelpersRoutingTable
|
||||
63, // 121: talos.resource.definitions.network.RouteStatusSpec.scope:type_name -> talos.resource.definitions.enums.NethelpersScope
|
||||
94, // 122: talos.resource.definitions.network.RouteStatusSpec.type:type_name -> talos.resource.definitions.enums.NethelpersRouteType
|
||||
95, // 123: talos.resource.definitions.network.RouteStatusSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersRouteProtocol
|
||||
92, // 124: talos.resource.definitions.network.TCPProbeSpec.timeout:type_name -> google.protobuf.Duration
|
||||
64, // 125: talos.resource.definitions.network.TimeServerSpecSpec.config_layer:type_name -> talos.resource.definitions.enums.NetworkConfigLayer
|
||||
65, // 126: talos.resource.definitions.network.VIPOperatorSpec.ip:type_name -> common.NetIP
|
||||
54, // 127: talos.resource.definitions.network.VIPOperatorSpec.equinix_metal:type_name -> talos.resource.definitions.network.VIPEquinixMetalSpec
|
||||
55, // 128: talos.resource.definitions.network.VIPOperatorSpec.h_cloud:type_name -> talos.resource.definitions.network.VIPHCloudSpec
|
||||
96, // 129: talos.resource.definitions.network.VLANSpec.protocol:type_name -> talos.resource.definitions.enums.NethelpersVLANProtocol
|
||||
92, // 130: talos.resource.definitions.network.WireguardPeer.persistent_keepalive_interval:type_name -> google.protobuf.Duration
|
||||
61, // 131: talos.resource.definitions.network.WireguardPeer.allowed_ips:type_name -> common.NetIPPrefix
|
||||
58, // 132: talos.resource.definitions.network.WireguardSpec.peers:type_name -> talos.resource.definitions.network.WireguardPeer
|
||||
133, // [133:133] is the sub-list for method output_type
|
||||
133, // [133:133] is the sub-list for method input_type
|
||||
133, // [133:133] is the sub-list for extension type_name
|
||||
133, // [133:133] is the sub-list for extension extendee
|
||||
0, // [0:133] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_resource_definitions_network_network_proto_init() }
|
||||
|
||||
@ -328,6 +328,72 @@ func (m *BondMasterSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
|
||||
i -= len(m.unknownFields)
|
||||
copy(dAtA[i:], m.unknownFields)
|
||||
}
|
||||
if m.MissedMax != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MissedMax))
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0xe0
|
||||
}
|
||||
if m.AdlacpActive != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AdlacpActive))
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0xd8
|
||||
}
|
||||
if len(m.Nsip6Targets) > 0 {
|
||||
for iNdEx := len(m.Nsip6Targets) - 1; iNdEx >= 0; iNdEx-- {
|
||||
if vtmsg, ok := interface{}(m.Nsip6Targets[iNdEx]).(interface {
|
||||
MarshalToSizedBufferVT([]byte) (int, error)
|
||||
}); ok {
|
||||
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
||||
} else {
|
||||
encoded, err := proto.Marshal(m.Nsip6Targets[iNdEx])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= len(encoded)
|
||||
copy(dAtA[i:], encoded)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0xd2
|
||||
}
|
||||
}
|
||||
if len(m.ArpipTargets) > 0 {
|
||||
for iNdEx := len(m.ArpipTargets) - 1; iNdEx >= 0; iNdEx-- {
|
||||
if vtmsg, ok := interface{}(m.ArpipTargets[iNdEx]).(interface {
|
||||
MarshalToSizedBufferVT([]byte) (int, error)
|
||||
}); ok {
|
||||
size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
|
||||
} else {
|
||||
encoded, err := proto.Marshal(m.ArpipTargets[iNdEx])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= len(encoded)
|
||||
copy(dAtA[i:], encoded)
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0xca
|
||||
}
|
||||
}
|
||||
if m.PeerNotifyDelay != 0 {
|
||||
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PeerNotifyDelay))
|
||||
i--
|
||||
@ -4824,6 +4890,36 @@ func (m *BondMasterSpec) SizeVT() (n int) {
|
||||
if m.PeerNotifyDelay != 0 {
|
||||
n += 2 + protohelpers.SizeOfVarint(uint64(m.PeerNotifyDelay))
|
||||
}
|
||||
if len(m.ArpipTargets) > 0 {
|
||||
for _, e := range m.ArpipTargets {
|
||||
if size, ok := interface{}(e).(interface {
|
||||
SizeVT() int
|
||||
}); ok {
|
||||
l = size.SizeVT()
|
||||
} else {
|
||||
l = proto.Size(e)
|
||||
}
|
||||
n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
}
|
||||
if len(m.Nsip6Targets) > 0 {
|
||||
for _, e := range m.Nsip6Targets {
|
||||
if size, ok := interface{}(e).(interface {
|
||||
SizeVT() int
|
||||
}); ok {
|
||||
l = size.SizeVT()
|
||||
} else {
|
||||
l = proto.Size(e)
|
||||
}
|
||||
n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.AdlacpActive != 0 {
|
||||
n += 2 + protohelpers.SizeOfVarint(uint64(m.AdlacpActive))
|
||||
}
|
||||
if m.MissedMax != 0 {
|
||||
n += 2 + protohelpers.SizeOfVarint(uint64(m.MissedMax))
|
||||
}
|
||||
n += len(m.unknownFields)
|
||||
return n
|
||||
}
|
||||
@ -7611,6 +7707,128 @@ func (m *BondMasterSpec) UnmarshalVT(dAtA []byte) error {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 25:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ArpipTargets", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ArpipTargets = append(m.ArpipTargets, &common.NetIP{})
|
||||
if unmarshal, ok := interface{}(m.ArpipTargets[len(m.ArpipTargets)-1]).(interface {
|
||||
UnmarshalVT([]byte) error
|
||||
}); ok {
|
||||
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ArpipTargets[len(m.ArpipTargets)-1]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 26:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Nsip6Targets", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protohelpers.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Nsip6Targets = append(m.Nsip6Targets, &common.NetIP{})
|
||||
if unmarshal, ok := interface{}(m.Nsip6Targets[len(m.Nsip6Targets)-1]).(interface {
|
||||
UnmarshalVT([]byte) error
|
||||
}); ok {
|
||||
if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Nsip6Targets[len(m.Nsip6Targets)-1]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 27:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field AdlacpActive", wireType)
|
||||
}
|
||||
m.AdlacpActive = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.AdlacpActive |= enums.NethelpersADLACPActive(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 28:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MissedMax", wireType)
|
||||
}
|
||||
m.MissedMax = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protohelpers.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.MissedMax |= uint32(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := protohelpers.Skip(dAtA[iNdEx:])
|
||||
|
||||
@ -219,3 +219,41 @@ type NetworkVLANConfig interface {
|
||||
ParentLink() string
|
||||
VLANMode() optional.Optional[nethelpers.VLANProtocol]
|
||||
}
|
||||
|
||||
// NetworkBondConfig defines a bond link configuration.
|
||||
//
|
||||
//nolint:interfacebloat
|
||||
type NetworkBondConfig interface {
|
||||
NamedDocument
|
||||
NetworkCommonLinkConfig
|
||||
NetworkHardwareAddressConfig
|
||||
BondConfig()
|
||||
Links() []string
|
||||
Mode() nethelpers.BondMode
|
||||
MIIMon() optional.Optional[uint32]
|
||||
UpDelay() optional.Optional[uint32]
|
||||
DownDelay() optional.Optional[uint32]
|
||||
UseCarrier() optional.Optional[bool]
|
||||
XmitHashPolicy() optional.Optional[nethelpers.BondXmitHashPolicy]
|
||||
ARPInterval() optional.Optional[uint32]
|
||||
ARPIPTargets() []netip.Addr
|
||||
NSIP6Targets() []netip.Addr
|
||||
ARPValidate() optional.Optional[nethelpers.ARPValidate]
|
||||
ARPAllTargets() optional.Optional[nethelpers.ARPAllTargets]
|
||||
LACPRate() optional.Optional[nethelpers.LACPRate]
|
||||
FailOverMAC() optional.Optional[nethelpers.FailOverMAC]
|
||||
ADSelect() optional.Optional[nethelpers.ADSelect]
|
||||
ADActorSysPrio() optional.Optional[uint16]
|
||||
ADUserPortKey() optional.Optional[uint16]
|
||||
ADLACPActive() optional.Optional[nethelpers.ADLACPActive]
|
||||
PrimaryReselect() optional.Optional[nethelpers.PrimaryReselect]
|
||||
ResendIGMP() optional.Optional[uint32]
|
||||
MinLinks() optional.Optional[uint32]
|
||||
LPInterval() optional.Optional[uint32]
|
||||
PacketsPerSlave() optional.Optional[uint32]
|
||||
NumPeerNotif() optional.Optional[uint8]
|
||||
TLBDynamicLB() optional.Optional[uint8]
|
||||
AllSlavesActive() optional.Optional[uint8]
|
||||
PeerNotifyDelay() optional.Optional[uint32]
|
||||
MissedMax() optional.Optional[uint8]
|
||||
}
|
||||
|
||||
@ -758,6 +758,337 @@
|
||||
],
|
||||
"description": "AddressConfig represents a network address configuration."
|
||||
},
|
||||
"network.BondConfigV1Alpha1": {
|
||||
"properties": {
|
||||
"apiVersion": {
|
||||
"enum": [
|
||||
"v1alpha1"
|
||||
],
|
||||
"title": "apiVersion",
|
||||
"description": "apiVersion is the API version of the resource.\n",
|
||||
"markdownDescription": "apiVersion is the API version of the resource.",
|
||||
"x-intellij-html-description": "\u003cp\u003eapiVersion is the API version of the resource.\u003c/p\u003e\n"
|
||||
},
|
||||
"kind": {
|
||||
"enum": [
|
||||
"BondConfig"
|
||||
],
|
||||
"title": "kind",
|
||||
"description": "kind is the kind of the resource.\n",
|
||||
"markdownDescription": "kind is the kind of the resource.",
|
||||
"x-intellij-html-description": "\u003cp\u003ekind is the kind of the resource.\u003c/p\u003e\n"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "name",
|
||||
"description": "Name of the bond link (interface) to be created.\n",
|
||||
"markdownDescription": "Name of the bond link (interface) to be created.",
|
||||
"x-intellij-html-description": "\u003cp\u003eName of the bond link (interface) to be created.\u003c/p\u003e\n"
|
||||
},
|
||||
"hardwareAddr": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f:]+$",
|
||||
"title": "hardwareAddr",
|
||||
"description": "Override the hardware (MAC) address of the link.\n",
|
||||
"markdownDescription": "Override the hardware (MAC) address of the link.",
|
||||
"x-intellij-html-description": "\u003cp\u003eOverride the hardware (MAC) address of the link.\u003c/p\u003e\n"
|
||||
},
|
||||
"links": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "links",
|
||||
"description": "Names of the links (interfaces) on which the bond will be created.\nLink aliases can be used here as well.\n",
|
||||
"markdownDescription": "Names of the links (interfaces) on which the bond will be created.\nLink aliases can be used here as well.",
|
||||
"x-intellij-html-description": "\u003cp\u003eNames of the links (interfaces) on which the bond will be created.\nLink aliases can be used here as well.\u003c/p\u003e\n"
|
||||
},
|
||||
"bondMode": {
|
||||
"enum": [
|
||||
"balance-rr",
|
||||
"active-backup",
|
||||
"balance-xor",
|
||||
"broadcast",
|
||||
"802.3ad",
|
||||
"balance-tlb",
|
||||
"balance-alb"
|
||||
],
|
||||
"title": "bondMode",
|
||||
"description": "Bond mode.\n",
|
||||
"markdownDescription": "Bond mode.",
|
||||
"x-intellij-html-description": "\u003cp\u003eBond mode.\u003c/p\u003e\n"
|
||||
},
|
||||
"miimon": {
|
||||
"type": "integer",
|
||||
"title": "miimon",
|
||||
"description": "Link monitoring frequency in milliseconds.\n",
|
||||
"markdownDescription": "Link monitoring frequency in milliseconds.",
|
||||
"x-intellij-html-description": "\u003cp\u003eLink monitoring frequency in milliseconds.\u003c/p\u003e\n"
|
||||
},
|
||||
"updelay": {
|
||||
"type": "integer",
|
||||
"title": "updelay",
|
||||
"description": "The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.\n",
|
||||
"markdownDescription": "The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.\u003c/p\u003e\n"
|
||||
},
|
||||
"downdelay": {
|
||||
"type": "integer",
|
||||
"title": "downdelay",
|
||||
"description": "The time, in milliseconds, to wait before disabling a slave after a link failure has been detected.\n",
|
||||
"markdownDescription": "The time, in milliseconds, to wait before disabling a slave after a link failure has been detected.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe time, in milliseconds, to wait before disabling a slave after a link failure has been detected.\u003c/p\u003e\n"
|
||||
},
|
||||
"useCarrier": {
|
||||
"type": "boolean",
|
||||
"title": "useCarrier",
|
||||
"description": "Specifies whether or not miimon should use MII or ETHTOOL.\n",
|
||||
"markdownDescription": "Specifies whether or not miimon should use MII or ETHTOOL.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether or not miimon should use MII or ETHTOOL.\u003c/p\u003e\n"
|
||||
},
|
||||
"xmitHashPolicy": {
|
||||
"enum": [
|
||||
"layer2",
|
||||
"layer3+4",
|
||||
"layer2+3",
|
||||
"encap2+3",
|
||||
"encap3+4"
|
||||
],
|
||||
"title": "xmitHashPolicy",
|
||||
"description": "Selects the transmit hash policy to use for slave selection.\n",
|
||||
"markdownDescription": "Selects the transmit hash policy to use for slave selection.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSelects the transmit hash policy to use for slave selection.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpInterval": {
|
||||
"type": "integer",
|
||||
"title": "arpInterval",
|
||||
"description": "ARP link monitoring frequency in milliseconds.\n",
|
||||
"markdownDescription": "ARP link monitoring frequency in milliseconds.",
|
||||
"x-intellij-html-description": "\u003cp\u003eARP link monitoring frequency in milliseconds.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpIpTargets": {
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f.:]+$"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "arpIpTargets",
|
||||
"description": "The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\n",
|
||||
"markdownDescription": "The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\u003c/p\u003e\n"
|
||||
},
|
||||
"nsIp6Targets": {
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f.:]+$"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "nsIp6Targets",
|
||||
"description": "The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\n",
|
||||
"markdownDescription": "The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe list of IPv6 addresses to use for NS link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpValidate": {
|
||||
"enum": [
|
||||
"none",
|
||||
"active",
|
||||
"backup",
|
||||
"all",
|
||||
"filter",
|
||||
"filter-active",
|
||||
"filter-backup"
|
||||
],
|
||||
"title": "arpValidate",
|
||||
"description": "Specifies whether or not ARP probes and replies should be validated.\n",
|
||||
"markdownDescription": "Specifies whether or not ARP probes and replies should be validated.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether or not ARP probes and replies should be validated.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpAllTargets": {
|
||||
"enum": [
|
||||
"any",
|
||||
"all"
|
||||
],
|
||||
"title": "arpAllTargets",
|
||||
"description": "Specifies whether ARP probes should be sent to any or all targets.\n",
|
||||
"markdownDescription": "Specifies whether ARP probes should be sent to any or all targets.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether ARP probes should be sent to any or all targets.\u003c/p\u003e\n"
|
||||
},
|
||||
"lacpRate": {
|
||||
"enum": [
|
||||
"slow",
|
||||
"fast"
|
||||
],
|
||||
"title": "lacpRate",
|
||||
"description": "LACPDU frames periodic transmission rate.\n",
|
||||
"markdownDescription": "LACPDU frames periodic transmission rate.",
|
||||
"x-intellij-html-description": "\u003cp\u003eLACPDU frames periodic transmission rate.\u003c/p\u003e\n"
|
||||
},
|
||||
"failOverMac": {
|
||||
"enum": [
|
||||
"none",
|
||||
"active",
|
||||
"follow"
|
||||
],
|
||||
"title": "failOverMac",
|
||||
"description": "Specifies whether active-backup mode should set all slaves to the same MAC address\nat enslavement, when enabled, or perform special handling.\n",
|
||||
"markdownDescription": "Specifies whether active-backup mode should set all slaves to the same MAC address\nat enslavement, when enabled, or perform special handling.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether active-backup mode should set all slaves to the same MAC address\nat enslavement, when enabled, or perform special handling.\u003c/p\u003e\n"
|
||||
},
|
||||
"adSelect": {
|
||||
"enum": [
|
||||
"stable",
|
||||
"bandwidth",
|
||||
"count"
|
||||
],
|
||||
"title": "adSelect",
|
||||
"description": "Aggregate selection policy for 802.3ad.\n",
|
||||
"markdownDescription": "Aggregate selection policy for 802.3ad.",
|
||||
"x-intellij-html-description": "\u003cp\u003eAggregate selection policy for 802.3ad.\u003c/p\u003e\n"
|
||||
},
|
||||
"adActorSysPrio": {
|
||||
"type": "integer",
|
||||
"title": "adActorSysPrio",
|
||||
"description": "Actor system priority for 802.3ad.\n",
|
||||
"markdownDescription": "Actor system priority for 802.3ad.",
|
||||
"x-intellij-html-description": "\u003cp\u003eActor system priority for 802.3ad.\u003c/p\u003e\n"
|
||||
},
|
||||
"adUserPortKey": {
|
||||
"type": "integer",
|
||||
"title": "adUserPortKey",
|
||||
"description": "User port key (upper 10 bits) for 802.3ad.\n",
|
||||
"markdownDescription": "User port key (upper 10 bits) for 802.3ad.",
|
||||
"x-intellij-html-description": "\u003cp\u003eUser port key (upper 10 bits) for 802.3ad.\u003c/p\u003e\n"
|
||||
},
|
||||
"adLACPActive": {
|
||||
"enum": [
|
||||
"on",
|
||||
"off"
|
||||
],
|
||||
"title": "adLACPActive",
|
||||
"description": "Whether to send LACPDU frames periodically.\n",
|
||||
"markdownDescription": "Whether to send LACPDU frames periodically.",
|
||||
"x-intellij-html-description": "\u003cp\u003eWhether to send LACPDU frames periodically.\u003c/p\u003e\n"
|
||||
},
|
||||
"primaryReselect": {
|
||||
"enum": [
|
||||
"always",
|
||||
"better",
|
||||
"failure"
|
||||
],
|
||||
"title": "primaryReselect",
|
||||
"description": "Policy under which the primary slave should be reselected.\n",
|
||||
"markdownDescription": "Policy under which the primary slave should be reselected.",
|
||||
"x-intellij-html-description": "\u003cp\u003ePolicy under which the primary slave should be reselected.\u003c/p\u003e\n"
|
||||
},
|
||||
"resendIGMP": {
|
||||
"type": "integer",
|
||||
"title": "resendIGMP",
|
||||
"description": "The number of times IGMP packets should be resent.\n",
|
||||
"markdownDescription": "The number of times IGMP packets should be resent.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of times IGMP packets should be resent.\u003c/p\u003e\n"
|
||||
},
|
||||
"minLinks": {
|
||||
"type": "integer",
|
||||
"title": "minLinks",
|
||||
"description": "The minimum number of active links required for the bond to be considered active.\n",
|
||||
"markdownDescription": "The minimum number of active links required for the bond to be considered active.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe minimum number of active links required for the bond to be considered active.\u003c/p\u003e\n"
|
||||
},
|
||||
"lpInterval": {
|
||||
"type": "integer",
|
||||
"title": "lpInterval",
|
||||
"description": "The number of seconds between instances where the bonding driver sends learning packets to each slave’s peer switch.\n",
|
||||
"markdownDescription": "The number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of seconds between instances where the bonding driver sends learning packets to each slave\u0026rsquo;s peer switch.\u003c/p\u003e\n"
|
||||
},
|
||||
"packetsPerSlave": {
|
||||
"type": "integer",
|
||||
"title": "packetsPerSlave",
|
||||
"description": "The number of packets to transmit through a slave before moving to the next one.\n",
|
||||
"markdownDescription": "The number of packets to transmit through a slave before moving to the next one.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of packets to transmit through a slave before moving to the next one.\u003c/p\u003e\n"
|
||||
},
|
||||
"numPeerNotif": {
|
||||
"type": "integer",
|
||||
"title": "numPeerNotif",
|
||||
"description": "The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)\nto be issued after a failover event.\n",
|
||||
"markdownDescription": "The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)\nto be issued after a failover event.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)\nto be issued after a failover event.\u003c/p\u003e\n"
|
||||
},
|
||||
"tlbLogicalLb": {
|
||||
"type": "integer",
|
||||
"title": "tlbLogicalLb",
|
||||
"description": "Whether dynamic shuffling of flows is enabled in tlb or alb mode.\n",
|
||||
"markdownDescription": "Whether dynamic shuffling of flows is enabled in tlb or alb mode.",
|
||||
"x-intellij-html-description": "\u003cp\u003eWhether dynamic shuffling of flows is enabled in tlb or alb mode.\u003c/p\u003e\n"
|
||||
},
|
||||
"allSlavesActive": {
|
||||
"type": "integer",
|
||||
"title": "allSlavesActive",
|
||||
"description": "Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).\n",
|
||||
"markdownDescription": "Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).",
|
||||
"x-intellij-html-description": "\u003cp\u003eWhether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).\u003c/p\u003e\n"
|
||||
},
|
||||
"peerNotifDelay": {
|
||||
"type": "integer",
|
||||
"title": "peerNotifDelay",
|
||||
"description": "The delay, in milliseconds, between each peer notification.\n",
|
||||
"markdownDescription": "The delay, in milliseconds, between each peer notification.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe delay, in milliseconds, between each peer notification.\u003c/p\u003e\n"
|
||||
},
|
||||
"missedMax": {
|
||||
"type": "integer",
|
||||
"title": "missedMax",
|
||||
"description": "The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.\n",
|
||||
"markdownDescription": "The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.\u003c/p\u003e\n"
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean",
|
||||
"title": "up",
|
||||
"description": "Bring the link up or down.\n\nIf not specified, the link will be brought up.\n",
|
||||
"markdownDescription": "Bring the link up or down.\n\nIf not specified, the link will be brought up.",
|
||||
"x-intellij-html-description": "\u003cp\u003eBring the link up or down.\u003c/p\u003e\n\n\u003cp\u003eIf not specified, the link will be brought up.\u003c/p\u003e\n"
|
||||
},
|
||||
"mtu": {
|
||||
"type": "integer",
|
||||
"title": "mtu",
|
||||
"description": "Configure LinkMTU (Maximum Transmission Unit) for the link.\n\nIf not specified, the system default LinkMTU will be used (usually 1500).\n",
|
||||
"markdownDescription": "Configure LinkMTU (Maximum Transmission Unit) for the link.\n\nIf not specified, the system default LinkMTU will be used (usually 1500).",
|
||||
"x-intellij-html-description": "\u003cp\u003eConfigure LinkMTU (Maximum Transmission Unit) for the link.\u003c/p\u003e\n\n\u003cp\u003eIf not specified, the system default LinkMTU will be used (usually 1500).\u003c/p\u003e\n"
|
||||
},
|
||||
"addresses": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/network.AddressConfig"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "addresses",
|
||||
"description": "Configure addresses to be statically assigned to the link.\n",
|
||||
"markdownDescription": "Configure addresses to be statically assigned to the link.",
|
||||
"x-intellij-html-description": "\u003cp\u003eConfigure addresses to be statically assigned to the link.\u003c/p\u003e\n"
|
||||
},
|
||||
"routes": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/network.RouteConfig"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "routes",
|
||||
"description": "Configure routes to be statically created via the link.\n",
|
||||
"markdownDescription": "Configure routes to be statically created via the link.",
|
||||
"x-intellij-html-description": "\u003cp\u003eConfigure routes to be statically created via the link.\u003c/p\u003e\n"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"apiVersion",
|
||||
"bondMode",
|
||||
"kind",
|
||||
"links",
|
||||
"name"
|
||||
],
|
||||
"description": "BondConfig is a config document to create a bond (link aggregation) over a set of links."
|
||||
},
|
||||
"network.CommonLinkConfig": {
|
||||
"properties": {
|
||||
"up": {
|
||||
@ -1810,9 +2141,9 @@
|
||||
"parent": {
|
||||
"type": "string",
|
||||
"title": "parent",
|
||||
"description": "Name of the parent link (interface) on which the VLAN link will be created.\n",
|
||||
"markdownDescription": "Name of the parent link (interface) on which the VLAN link will be created.",
|
||||
"x-intellij-html-description": "\u003cp\u003eName of the parent link (interface) on which the VLAN link will be created.\u003c/p\u003e\n"
|
||||
"description": "Name of the parent link (interface) on which the VLAN link will be created.\nLink aliases can be used here as well.\n",
|
||||
"markdownDescription": "Name of the parent link (interface) on which the VLAN link will be created.\nLink aliases can be used here as well.",
|
||||
"x-intellij-html-description": "\u003cp\u003eName of the parent link (interface) on which the VLAN link will be created.\nLink aliases can be used here as well.\u003c/p\u003e\n"
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean",
|
||||
@ -5059,6 +5390,9 @@
|
||||
{
|
||||
"$ref": "#/$defs/hardware.PCIDriverRebindConfigV1Alpha1"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/network.BondConfigV1Alpha1"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/network.DefaultActionConfigV1Alpha1"
|
||||
},
|
||||
|
||||
613
pkg/machinery/config/types/network/bond.go
Normal file
613
pkg/machinery/config/types/network/bond.go
Normal file
@ -0,0 +1,613 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package network
|
||||
|
||||
//docgen:jsonschema
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/netip"
|
||||
|
||||
"github.com/siderolabs/gen/optional"
|
||||
"github.com/siderolabs/go-pointer"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/config"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/internal/registry"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/types/meta"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/validation"
|
||||
"github.com/siderolabs/talos/pkg/machinery/nethelpers"
|
||||
)
|
||||
|
||||
// BondKind is a Bond config document kind.
|
||||
const BondKind = "BondConfig"
|
||||
|
||||
func init() {
|
||||
registry.Register(BondKind, func(version string) config.Document {
|
||||
switch version {
|
||||
case "v1alpha1": //nolint:goconst
|
||||
return &BondConfigV1Alpha1{}
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Check interfaces.
|
||||
var (
|
||||
_ config.NetworkBondConfig = &BondConfigV1Alpha1{}
|
||||
_ config.ConflictingDocument = &BondConfigV1Alpha1{}
|
||||
_ config.NamedDocument = &BondConfigV1Alpha1{}
|
||||
_ config.Validator = &BondConfigV1Alpha1{}
|
||||
)
|
||||
|
||||
// BondConfigV1Alpha1 is a config document to create a bond (link aggregation) over a set of links.
|
||||
//
|
||||
// examples:
|
||||
// - value: exampleBondConfigV1Alpha1()
|
||||
// alias: BondConfig
|
||||
// schemaRoot: true
|
||||
// schemaMeta: v1alpha1/BondConfig
|
||||
type BondConfigV1Alpha1 struct {
|
||||
meta.Meta `yaml:",inline"`
|
||||
|
||||
// description: |
|
||||
// Name of the bond link (interface) to be created.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// "bond.ext"
|
||||
// schemaRequired: true
|
||||
MetaName string `yaml:"name"`
|
||||
// description: |
|
||||
// Override the hardware (MAC) address of the link.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// nethelpers.HardwareAddr{0x2e, 0x3c, 0x4d, 0x5e, 0x6f, 0x70}
|
||||
// schema:
|
||||
// type: string
|
||||
// pattern: ^[0-9a-f:]+$
|
||||
HardwareAddressConfig nethelpers.HardwareAddr `yaml:"hardwareAddr,omitempty"`
|
||||
// description: |
|
||||
// Names of the links (interfaces) on which the bond will be created.
|
||||
// Link aliases can be used here as well.
|
||||
// examples:
|
||||
// - value: >
|
||||
// []string{"enp0s3", "enp0s8"}
|
||||
// schemaRequired: true
|
||||
BondLinks []string `yaml:"links,omitempty"`
|
||||
// description: |
|
||||
// Bond mode.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// "802.3ad"
|
||||
// values:
|
||||
// - "balance-rr"
|
||||
// - "active-backup"
|
||||
// - "balance-xor"
|
||||
// - "broadcast"
|
||||
// - "802.3ad"
|
||||
// - "balance-tlb"
|
||||
// - "balance-alb"
|
||||
// schemaRequired: true
|
||||
BondMode *nethelpers.BondMode `yaml:"bondMode,omitempty"`
|
||||
// description: |
|
||||
// Link monitoring frequency in milliseconds.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// 200
|
||||
BondMIIMon *uint32 `yaml:"miimon,omitempty"`
|
||||
// description: |
|
||||
// The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// 300
|
||||
BondUpDelay *uint32 `yaml:"updelay,omitempty"`
|
||||
// description: |
|
||||
// The time, in milliseconds, to wait before disabling a slave after a link failure has been detected.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// 100
|
||||
BondDownDelay *uint32 `yaml:"downdelay,omitempty"`
|
||||
// description: |
|
||||
// Specifies whether or not miimon should use MII or ETHTOOL.
|
||||
BondUseCarrier *bool `yaml:"useCarrier,omitempty"`
|
||||
// description: |
|
||||
// Selects the transmit hash policy to use for slave selection.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "layer2"
|
||||
// values:
|
||||
// - "layer2"
|
||||
// - "layer3+4"
|
||||
// - "layer2+3"
|
||||
// - "encap2+3"
|
||||
// - "encap3+4"
|
||||
BondXmitHashPolicy *nethelpers.BondXmitHashPolicy `yaml:"xmitHashPolicy,omitempty"`
|
||||
// description: |
|
||||
// ARP link monitoring frequency in milliseconds.
|
||||
// examples:
|
||||
// - value: >
|
||||
// 1000
|
||||
BondARPInterval *uint32 `yaml:"arpInterval,omitempty"`
|
||||
// description: |
|
||||
// The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.
|
||||
// Maximum of 16 targets are supported.
|
||||
// examples:
|
||||
// - value: >
|
||||
// []netip.Addr{netip.MustParseAddr("10.15.0.1")}
|
||||
// schema:
|
||||
// type: array
|
||||
// items:
|
||||
// type: string
|
||||
// pattern: ^[0-9a-f.:]+$
|
||||
BondARPIPTargets []netip.Addr `yaml:"arpIpTargets,omitempty"`
|
||||
// description: |
|
||||
// The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.
|
||||
// Maximum of 16 targets are supported.
|
||||
// examples:
|
||||
// - value: >
|
||||
// []netip.Addr{netip.MustParseAddr("fd00::1")}
|
||||
// schema:
|
||||
// type: array
|
||||
// items:
|
||||
// type: string
|
||||
// pattern: ^[0-9a-f.:]+$
|
||||
BondNSIP6Targets []netip.Addr `yaml:"nsIp6Targets,omitempty"`
|
||||
// description: |
|
||||
// Specifies whether or not ARP probes and replies should be validated.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "active"
|
||||
// values:
|
||||
// - "none"
|
||||
// - "active"
|
||||
// - "backup"
|
||||
// - "all"
|
||||
// - "filter"
|
||||
// - "filter-active"
|
||||
// - "filter-backup"
|
||||
BondARPValidate *nethelpers.ARPValidate `yaml:"arpValidate,omitempty"`
|
||||
// description: |
|
||||
// Specifies whether ARP probes should be sent to any or all targets.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "all"
|
||||
// values:
|
||||
// - "any"
|
||||
// - "all"
|
||||
BondARPAllTargets *nethelpers.ARPAllTargets `yaml:"arpAllTargets,omitempty"`
|
||||
// description: |
|
||||
// LACPDU frames periodic transmission rate.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "fast"
|
||||
// values:
|
||||
// - "slow"
|
||||
// - "fast"
|
||||
BondLACPRate *nethelpers.LACPRate `yaml:"lacpRate,omitempty"`
|
||||
// description: |
|
||||
// Specifies whether active-backup mode should set all slaves to the same MAC address
|
||||
// at enslavement, when enabled, or perform special handling.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "active"
|
||||
// values:
|
||||
// - "none"
|
||||
// - "active"
|
||||
// - "follow"
|
||||
BondFailOverMAC *nethelpers.FailOverMAC `yaml:"failOverMac,omitempty"`
|
||||
// description: |
|
||||
// Aggregate selection policy for 802.3ad.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "stable"
|
||||
// values:
|
||||
// - "stable"
|
||||
// - "bandwidth"
|
||||
// - "count"
|
||||
BondADSelect *nethelpers.ADSelect `yaml:"adSelect,omitempty"`
|
||||
// description: |
|
||||
// Actor system priority for 802.3ad.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// 65535
|
||||
BondADActorSysPrio *uint16 `yaml:"adActorSysPrio,omitempty"`
|
||||
// description: |
|
||||
// User port key (upper 10 bits) for 802.3ad.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
// 0
|
||||
BondADUserPortKey *uint16 `yaml:"adUserPortKey,omitempty"`
|
||||
// description: |
|
||||
// Whether to send LACPDU frames periodically.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "on"
|
||||
// values:
|
||||
// - "on"
|
||||
// - "off"
|
||||
BondADLACPActive *nethelpers.ADLACPActive `yaml:"adLACPActive,omitempty"`
|
||||
// description: |
|
||||
// Policy under which the primary slave should be reselected.
|
||||
// examples:
|
||||
// - value: >
|
||||
// "always"
|
||||
// values:
|
||||
// - "always"
|
||||
// - "better"
|
||||
// - "failure"
|
||||
BondPrimaryReselect *nethelpers.PrimaryReselect `yaml:"primaryReselect,omitempty"`
|
||||
// description: |
|
||||
// The number of times IGMP packets should be resent.
|
||||
BondResendIGMP *uint32 `yaml:"resendIGMP,omitempty"`
|
||||
// description: |
|
||||
// The minimum number of active links required for the bond to be considered active.
|
||||
BondMinLinks *uint32 `yaml:"minLinks,omitempty"`
|
||||
// description: |
|
||||
// The number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch.
|
||||
BondLPInterval *uint32 `yaml:"lpInterval,omitempty"`
|
||||
// description: |
|
||||
// The number of packets to transmit through a slave before moving to the next one.
|
||||
BondPacketsPerSlave *uint32 `yaml:"packetsPerSlave,omitempty"`
|
||||
// description: |
|
||||
// The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)
|
||||
// to be issued after a failover event.
|
||||
BondNumPeerNotif *uint8 `yaml:"numPeerNotif,omitempty"`
|
||||
// description: |
|
||||
// Whether dynamic shuffling of flows is enabled in tlb or alb mode.
|
||||
// examples:
|
||||
// - value: >
|
||||
// 1
|
||||
BondTLBDynamicLB *uint8 `yaml:"tlbLogicalLb,omitempty"`
|
||||
// description: |
|
||||
// Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).
|
||||
// examples:
|
||||
// - value: >
|
||||
// 0
|
||||
BondAllSlavesActive *uint8 `yaml:"allSlavesActive,omitempty"`
|
||||
// description: |
|
||||
// The delay, in milliseconds, between each peer notification.
|
||||
BondPeerNotifyDelay *uint32 `yaml:"peerNotifDelay,omitempty"`
|
||||
// description: |
|
||||
// The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.
|
||||
BondMissedMax *uint8 `yaml:"missedMax,omitempty"`
|
||||
|
||||
//nolint:embeddedstructfieldcheck
|
||||
CommonLinkConfig `yaml:",inline"`
|
||||
}
|
||||
|
||||
// NewBondConfigV1Alpha1 creates a new BondConfig config document.
|
||||
func NewBondConfigV1Alpha1(name string) *BondConfigV1Alpha1 {
|
||||
return &BondConfigV1Alpha1{
|
||||
Meta: meta.Meta{
|
||||
MetaKind: BondKind,
|
||||
MetaAPIVersion: "v1alpha1",
|
||||
},
|
||||
MetaName: name,
|
||||
}
|
||||
}
|
||||
|
||||
func exampleBondConfigV1Alpha1() *BondConfigV1Alpha1 {
|
||||
cfg := NewBondConfigV1Alpha1("bond.int")
|
||||
cfg.BondLinks = []string{"enp1s2", "enp1s2"}
|
||||
cfg.BondMode = pointer.To(nethelpers.BondMode8023AD)
|
||||
cfg.BondXmitHashPolicy = pointer.To(nethelpers.BondXmitPolicyLayer34)
|
||||
cfg.BondLACPRate = pointer.To(nethelpers.LACPRateSlow)
|
||||
cfg.BondMIIMon = pointer.To(uint32(100))
|
||||
cfg.BondUpDelay = pointer.To(uint32(200))
|
||||
cfg.BondDownDelay = pointer.To(uint32(200))
|
||||
cfg.BondResendIGMP = pointer.To(uint32(1))
|
||||
cfg.BondPacketsPerSlave = pointer.To(uint32(1))
|
||||
cfg.BondADActorSysPrio = pointer.To(uint16(65535))
|
||||
|
||||
cfg.LinkAddresses = []AddressConfig{
|
||||
{
|
||||
AddressAddress: netip.MustParsePrefix("10.15.0.3/16"),
|
||||
},
|
||||
}
|
||||
cfg.LinkRoutes = []RouteConfig{
|
||||
{
|
||||
RouteDestination: Prefix{netip.MustParsePrefix("10.0.0.0/8")},
|
||||
RouteGateway: Addr{netip.MustParseAddr("10.15.0.1")},
|
||||
},
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
// Clone implements config.Document interface.
|
||||
func (s *BondConfigV1Alpha1) Clone() config.Document {
|
||||
return s.DeepCopy()
|
||||
}
|
||||
|
||||
// Name implements config.NamedDocument interface.
|
||||
func (s *BondConfigV1Alpha1) Name() string {
|
||||
return s.MetaName
|
||||
}
|
||||
|
||||
// BondConfig implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) BondConfig() {}
|
||||
|
||||
// ConflictsWithKinds implements config.ConflictingDocument interface.
|
||||
func (s *BondConfigV1Alpha1) ConflictsWithKinds() []string {
|
||||
return conflictingLinkKinds(BondKind)
|
||||
}
|
||||
|
||||
// Validate implements config.Validator interface.
|
||||
func (s *BondConfigV1Alpha1) Validate(validation.RuntimeMode, ...validation.Option) ([]string, error) {
|
||||
var (
|
||||
errs error
|
||||
warnings []string
|
||||
)
|
||||
|
||||
if s.MetaName == "" {
|
||||
errs = errors.Join(errs, errors.New("name must be specified"))
|
||||
}
|
||||
|
||||
if len(s.BondLinks) == 0 {
|
||||
errs = errors.Join(errs, errors.New("at least one link must be specified"))
|
||||
}
|
||||
|
||||
if s.BondMode == nil {
|
||||
errs = errors.Join(errs, errors.New("bond mode must be specified"))
|
||||
}
|
||||
|
||||
extraWarnings, extraErrs := s.CommonLinkConfig.Validate()
|
||||
errs, warnings = errors.Join(errs, extraErrs), append(warnings, extraWarnings...)
|
||||
|
||||
return warnings, errs
|
||||
}
|
||||
|
||||
// Links implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) Links() []string {
|
||||
return s.BondLinks
|
||||
}
|
||||
|
||||
// Mode implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) Mode() nethelpers.BondMode {
|
||||
return pointer.SafeDeref(s.BondMode)
|
||||
}
|
||||
|
||||
// MIIMon implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) MIIMon() optional.Optional[uint32] {
|
||||
if s.BondMIIMon == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondMIIMon)
|
||||
}
|
||||
|
||||
// UpDelay implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) UpDelay() optional.Optional[uint32] {
|
||||
if s.BondUpDelay == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondUpDelay)
|
||||
}
|
||||
|
||||
// DownDelay implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) DownDelay() optional.Optional[uint32] {
|
||||
if s.BondDownDelay == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondDownDelay)
|
||||
}
|
||||
|
||||
// UseCarrier implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) UseCarrier() optional.Optional[bool] {
|
||||
if s.BondUseCarrier == nil {
|
||||
return optional.None[bool]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondUseCarrier)
|
||||
}
|
||||
|
||||
// XmitHashPolicy implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) XmitHashPolicy() optional.Optional[nethelpers.BondXmitHashPolicy] {
|
||||
if s.BondXmitHashPolicy == nil {
|
||||
return optional.None[nethelpers.BondXmitHashPolicy]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondXmitHashPolicy)
|
||||
}
|
||||
|
||||
// ARPInterval implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ARPInterval() optional.Optional[uint32] {
|
||||
if s.BondARPInterval == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondARPInterval)
|
||||
}
|
||||
|
||||
// ARPIPTargets implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ARPIPTargets() []netip.Addr {
|
||||
return s.BondARPIPTargets
|
||||
}
|
||||
|
||||
// NSIP6Targets implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) NSIP6Targets() []netip.Addr {
|
||||
return s.BondNSIP6Targets
|
||||
}
|
||||
|
||||
// ARPValidate implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ARPValidate() optional.Optional[nethelpers.ARPValidate] {
|
||||
if s.BondARPValidate == nil {
|
||||
return optional.None[nethelpers.ARPValidate]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondARPValidate)
|
||||
}
|
||||
|
||||
// ARPAllTargets implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ARPAllTargets() optional.Optional[nethelpers.ARPAllTargets] {
|
||||
if s.BondARPAllTargets == nil {
|
||||
return optional.None[nethelpers.ARPAllTargets]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondARPAllTargets)
|
||||
}
|
||||
|
||||
// LACPRate implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) LACPRate() optional.Optional[nethelpers.LACPRate] {
|
||||
if s.BondLACPRate == nil {
|
||||
return optional.None[nethelpers.LACPRate]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondLACPRate)
|
||||
}
|
||||
|
||||
// FailOverMAC implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) FailOverMAC() optional.Optional[nethelpers.FailOverMAC] {
|
||||
if s.BondFailOverMAC == nil {
|
||||
return optional.None[nethelpers.FailOverMAC]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondFailOverMAC)
|
||||
}
|
||||
|
||||
// ADSelect implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ADSelect() optional.Optional[nethelpers.ADSelect] {
|
||||
if s.BondADSelect == nil {
|
||||
return optional.None[nethelpers.ADSelect]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondADSelect)
|
||||
}
|
||||
|
||||
// ADActorSysPrio implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ADActorSysPrio() optional.Optional[uint16] {
|
||||
if s.BondADActorSysPrio == nil {
|
||||
return optional.None[uint16]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondADActorSysPrio)
|
||||
}
|
||||
|
||||
// ADUserPortKey implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ADUserPortKey() optional.Optional[uint16] {
|
||||
if s.BondADUserPortKey == nil {
|
||||
return optional.None[uint16]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondADUserPortKey)
|
||||
}
|
||||
|
||||
// ADLACPActive implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ADLACPActive() optional.Optional[nethelpers.ADLACPActive] {
|
||||
if s.BondADLACPActive == nil {
|
||||
return optional.None[nethelpers.ADLACPActive]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondADLACPActive)
|
||||
}
|
||||
|
||||
// PrimaryReselect implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) PrimaryReselect() optional.Optional[nethelpers.PrimaryReselect] {
|
||||
if s.BondPrimaryReselect == nil {
|
||||
return optional.None[nethelpers.PrimaryReselect]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondPrimaryReselect)
|
||||
}
|
||||
|
||||
// ResendIGMP implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) ResendIGMP() optional.Optional[uint32] {
|
||||
if s.BondResendIGMP == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondResendIGMP)
|
||||
}
|
||||
|
||||
// MinLinks implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) MinLinks() optional.Optional[uint32] {
|
||||
if s.BondMinLinks == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondMinLinks)
|
||||
}
|
||||
|
||||
// LPInterval implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) LPInterval() optional.Optional[uint32] {
|
||||
if s.BondLPInterval == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondLPInterval)
|
||||
}
|
||||
|
||||
// PacketsPerSlave implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) PacketsPerSlave() optional.Optional[uint32] {
|
||||
if s.BondPacketsPerSlave == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondPacketsPerSlave)
|
||||
}
|
||||
|
||||
// NumPeerNotif implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) NumPeerNotif() optional.Optional[uint8] {
|
||||
if s.BondNumPeerNotif == nil {
|
||||
return optional.None[uint8]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondNumPeerNotif)
|
||||
}
|
||||
|
||||
// TLBDynamicLB implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) TLBDynamicLB() optional.Optional[uint8] {
|
||||
if s.BondTLBDynamicLB == nil {
|
||||
return optional.None[uint8]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondTLBDynamicLB)
|
||||
}
|
||||
|
||||
// AllSlavesActive implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) AllSlavesActive() optional.Optional[uint8] {
|
||||
if s.BondAllSlavesActive == nil {
|
||||
return optional.None[uint8]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondAllSlavesActive)
|
||||
}
|
||||
|
||||
// PeerNotifyDelay implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) PeerNotifyDelay() optional.Optional[uint32] {
|
||||
if s.BondPeerNotifyDelay == nil {
|
||||
return optional.None[uint32]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondPeerNotifyDelay)
|
||||
}
|
||||
|
||||
// MissedMax implements NetworkBondConfig interface.
|
||||
func (s *BondConfigV1Alpha1) MissedMax() optional.Optional[uint8] {
|
||||
if s.BondMissedMax == nil {
|
||||
return optional.None[uint8]()
|
||||
}
|
||||
|
||||
return optional.Some(*s.BondMissedMax)
|
||||
}
|
||||
|
||||
// HardwareAddress implements NetworkDummyLinkConfig interface.
|
||||
func (s *BondConfigV1Alpha1) HardwareAddress() optional.Optional[nethelpers.HardwareAddr] {
|
||||
if len(s.HardwareAddressConfig) == 0 {
|
||||
return optional.None[nethelpers.HardwareAddr]()
|
||||
}
|
||||
|
||||
return optional.Some(s.HardwareAddressConfig)
|
||||
}
|
||||
175
pkg/machinery/config/types/network/bond_test.go
Normal file
175
pkg/machinery/config/types/network/bond_test.go
Normal file
@ -0,0 +1,175 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package network_test
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"net/netip"
|
||||
"testing"
|
||||
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/configloader"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/encoder"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/types/meta"
|
||||
"github.com/siderolabs/talos/pkg/machinery/config/types/network"
|
||||
"github.com/siderolabs/talos/pkg/machinery/nethelpers"
|
||||
)
|
||||
|
||||
//go:embed testdata/bondconfig.yaml
|
||||
var expectedBondConfigDocument []byte
|
||||
|
||||
func TestBondConfigMarshalStability(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
cfg := network.NewBondConfigV1Alpha1("agg.0")
|
||||
cfg.BondLinks = []string{"eth0", "eth1"}
|
||||
cfg.BondMode = pointer.To(nethelpers.BondMode8023AD)
|
||||
cfg.BondXmitHashPolicy = pointer.To(nethelpers.BondXmitPolicyLayer34)
|
||||
cfg.BondLACPRate = pointer.To(nethelpers.LACPRateSlow)
|
||||
cfg.BondMIIMon = pointer.To(uint32(100))
|
||||
cfg.BondUpDelay = pointer.To(uint32(200))
|
||||
cfg.BondDownDelay = pointer.To(uint32(200))
|
||||
cfg.BondResendIGMP = pointer.To(uint32(1))
|
||||
cfg.BondPacketsPerSlave = pointer.To(uint32(1))
|
||||
cfg.BondADActorSysPrio = pointer.To(uint16(65535))
|
||||
cfg.LinkUp = pointer.To(true)
|
||||
cfg.LinkAddresses = []network.AddressConfig{
|
||||
{
|
||||
AddressAddress: netip.MustParsePrefix("1.2.3.4/24"),
|
||||
},
|
||||
}
|
||||
|
||||
marshaled, err := encoder.NewEncoder(cfg, encoder.WithComments(encoder.CommentsDisabled)).Encode()
|
||||
require.NoError(t, err)
|
||||
|
||||
t.Log(string(marshaled))
|
||||
|
||||
assert.Equal(t, expectedBondConfigDocument, marshaled)
|
||||
}
|
||||
|
||||
func TestBondConfigUnmarshal(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
provider, err := configloader.NewFromBytes(expectedBondConfigDocument)
|
||||
require.NoError(t, err)
|
||||
|
||||
docs := provider.Documents()
|
||||
require.Len(t, docs, 1)
|
||||
|
||||
assert.Equal(t, &network.BondConfigV1Alpha1{
|
||||
Meta: meta.Meta{
|
||||
MetaAPIVersion: "v1alpha1",
|
||||
MetaKind: network.BondKind,
|
||||
},
|
||||
MetaName: "agg.0",
|
||||
BondLinks: []string{"eth0", "eth1"},
|
||||
BondMode: pointer.To(nethelpers.BondMode8023AD),
|
||||
BondXmitHashPolicy: pointer.To(nethelpers.BondXmitPolicyLayer34),
|
||||
BondLACPRate: pointer.To(nethelpers.LACPRateSlow),
|
||||
BondMIIMon: pointer.To(uint32(100)),
|
||||
BondUpDelay: pointer.To(uint32(200)),
|
||||
BondDownDelay: pointer.To(uint32(200)),
|
||||
BondResendIGMP: pointer.To(uint32(1)),
|
||||
BondPacketsPerSlave: pointer.To(uint32(1)),
|
||||
BondADActorSysPrio: pointer.To(uint16(65535)),
|
||||
CommonLinkConfig: network.CommonLinkConfig{
|
||||
LinkUp: pointer.To(true),
|
||||
LinkAddresses: []network.AddressConfig{
|
||||
{
|
||||
AddressAddress: netip.MustParsePrefix("1.2.3.4/24"),
|
||||
},
|
||||
},
|
||||
},
|
||||
}, docs[0])
|
||||
}
|
||||
|
||||
func TestBondValidate(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, test := range []struct {
|
||||
name string
|
||||
cfg func() *network.BondConfigV1Alpha1
|
||||
|
||||
expectedError string
|
||||
expectedWarnings []string
|
||||
}{
|
||||
{
|
||||
name: "empty",
|
||||
cfg: func() *network.BondConfigV1Alpha1 {
|
||||
return network.NewBondConfigV1Alpha1("")
|
||||
},
|
||||
|
||||
expectedError: "name must be specified\nat least one link must be specified\nbond mode must be specified",
|
||||
},
|
||||
{
|
||||
name: "no links",
|
||||
|
||||
cfg: func() *network.BondConfigV1Alpha1 {
|
||||
cfg := network.NewBondConfigV1Alpha1("bond0")
|
||||
cfg.BondMode = pointer.To(nethelpers.BondModeActiveBackup)
|
||||
|
||||
return cfg
|
||||
},
|
||||
|
||||
expectedError: "at least one link must be specified",
|
||||
},
|
||||
{
|
||||
name: "no mode",
|
||||
|
||||
cfg: func() *network.BondConfigV1Alpha1 {
|
||||
cfg := network.NewBondConfigV1Alpha1("bond0")
|
||||
cfg.BondLinks = []string{"eth0", "eth1"}
|
||||
|
||||
return cfg
|
||||
},
|
||||
|
||||
expectedError: "bond mode must be specified",
|
||||
},
|
||||
{
|
||||
name: "valid",
|
||||
cfg: func() *network.BondConfigV1Alpha1 {
|
||||
cfg := network.NewBondConfigV1Alpha1("bond25")
|
||||
cfg.BondLinks = []string{"eth0", "eth1"}
|
||||
cfg.BondMode = pointer.To(nethelpers.BondMode8023AD)
|
||||
cfg.LinkAddresses = []network.AddressConfig{
|
||||
{
|
||||
AddressAddress: netip.MustParsePrefix("192.168.1.100/24"),
|
||||
},
|
||||
{
|
||||
AddressAddress: netip.MustParsePrefix("fd00::1/64"),
|
||||
},
|
||||
}
|
||||
cfg.LinkRoutes = []network.RouteConfig{
|
||||
{
|
||||
RouteDestination: network.Prefix{netip.MustParsePrefix("10.3.5.0/24")},
|
||||
RouteGateway: network.Addr{netip.MustParseAddr("10.3.5.1")},
|
||||
},
|
||||
{
|
||||
RouteGateway: network.Addr{netip.MustParseAddr("fe80::1")},
|
||||
},
|
||||
}
|
||||
|
||||
return cfg
|
||||
},
|
||||
},
|
||||
} {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
warnings, err := test.cfg().Validate(validationMode{})
|
||||
|
||||
assert.Equal(t, test.expectedWarnings, warnings)
|
||||
|
||||
if test.expectedError != "" {
|
||||
assert.EqualError(t, err, test.expectedError)
|
||||
} else {
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
// Code generated by "deep-copy -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type VLANConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
|
||||
// Code generated by "deep-copy -type BondConfigV1Alpha1 -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type VLANConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
|
||||
|
||||
package network
|
||||
|
||||
@ -12,6 +12,146 @@ import (
|
||||
"github.com/siderolabs/talos/pkg/machinery/nethelpers"
|
||||
)
|
||||
|
||||
// DeepCopy generates a deep copy of *BondConfigV1Alpha1.
|
||||
func (o *BondConfigV1Alpha1) DeepCopy() *BondConfigV1Alpha1 {
|
||||
var cp BondConfigV1Alpha1 = *o
|
||||
if o.HardwareAddressConfig != nil {
|
||||
cp.HardwareAddressConfig = make([]byte, len(o.HardwareAddressConfig))
|
||||
copy(cp.HardwareAddressConfig, o.HardwareAddressConfig)
|
||||
}
|
||||
if o.BondLinks != nil {
|
||||
cp.BondLinks = make([]string, len(o.BondLinks))
|
||||
copy(cp.BondLinks, o.BondLinks)
|
||||
}
|
||||
if o.BondMode != nil {
|
||||
cp.BondMode = new(nethelpers.BondMode)
|
||||
*cp.BondMode = *o.BondMode
|
||||
}
|
||||
if o.BondMIIMon != nil {
|
||||
cp.BondMIIMon = new(uint32)
|
||||
*cp.BondMIIMon = *o.BondMIIMon
|
||||
}
|
||||
if o.BondUpDelay != nil {
|
||||
cp.BondUpDelay = new(uint32)
|
||||
*cp.BondUpDelay = *o.BondUpDelay
|
||||
}
|
||||
if o.BondDownDelay != nil {
|
||||
cp.BondDownDelay = new(uint32)
|
||||
*cp.BondDownDelay = *o.BondDownDelay
|
||||
}
|
||||
if o.BondUseCarrier != nil {
|
||||
cp.BondUseCarrier = new(bool)
|
||||
*cp.BondUseCarrier = *o.BondUseCarrier
|
||||
}
|
||||
if o.BondXmitHashPolicy != nil {
|
||||
cp.BondXmitHashPolicy = new(nethelpers.BondXmitHashPolicy)
|
||||
*cp.BondXmitHashPolicy = *o.BondXmitHashPolicy
|
||||
}
|
||||
if o.BondARPInterval != nil {
|
||||
cp.BondARPInterval = new(uint32)
|
||||
*cp.BondARPInterval = *o.BondARPInterval
|
||||
}
|
||||
if o.BondARPIPTargets != nil {
|
||||
cp.BondARPIPTargets = make([]netip.Addr, len(o.BondARPIPTargets))
|
||||
copy(cp.BondARPIPTargets, o.BondARPIPTargets)
|
||||
}
|
||||
if o.BondNSIP6Targets != nil {
|
||||
cp.BondNSIP6Targets = make([]netip.Addr, len(o.BondNSIP6Targets))
|
||||
copy(cp.BondNSIP6Targets, o.BondNSIP6Targets)
|
||||
}
|
||||
if o.BondARPValidate != nil {
|
||||
cp.BondARPValidate = new(nethelpers.ARPValidate)
|
||||
*cp.BondARPValidate = *o.BondARPValidate
|
||||
}
|
||||
if o.BondARPAllTargets != nil {
|
||||
cp.BondARPAllTargets = new(nethelpers.ARPAllTargets)
|
||||
*cp.BondARPAllTargets = *o.BondARPAllTargets
|
||||
}
|
||||
if o.BondLACPRate != nil {
|
||||
cp.BondLACPRate = new(nethelpers.LACPRate)
|
||||
*cp.BondLACPRate = *o.BondLACPRate
|
||||
}
|
||||
if o.BondFailOverMAC != nil {
|
||||
cp.BondFailOverMAC = new(nethelpers.FailOverMAC)
|
||||
*cp.BondFailOverMAC = *o.BondFailOverMAC
|
||||
}
|
||||
if o.BondADSelect != nil {
|
||||
cp.BondADSelect = new(nethelpers.ADSelect)
|
||||
*cp.BondADSelect = *o.BondADSelect
|
||||
}
|
||||
if o.BondADActorSysPrio != nil {
|
||||
cp.BondADActorSysPrio = new(uint16)
|
||||
*cp.BondADActorSysPrio = *o.BondADActorSysPrio
|
||||
}
|
||||
if o.BondADUserPortKey != nil {
|
||||
cp.BondADUserPortKey = new(uint16)
|
||||
*cp.BondADUserPortKey = *o.BondADUserPortKey
|
||||
}
|
||||
if o.BondADLACPActive != nil {
|
||||
cp.BondADLACPActive = new(nethelpers.ADLACPActive)
|
||||
*cp.BondADLACPActive = *o.BondADLACPActive
|
||||
}
|
||||
if o.BondPrimaryReselect != nil {
|
||||
cp.BondPrimaryReselect = new(nethelpers.PrimaryReselect)
|
||||
*cp.BondPrimaryReselect = *o.BondPrimaryReselect
|
||||
}
|
||||
if o.BondResendIGMP != nil {
|
||||
cp.BondResendIGMP = new(uint32)
|
||||
*cp.BondResendIGMP = *o.BondResendIGMP
|
||||
}
|
||||
if o.BondMinLinks != nil {
|
||||
cp.BondMinLinks = new(uint32)
|
||||
*cp.BondMinLinks = *o.BondMinLinks
|
||||
}
|
||||
if o.BondLPInterval != nil {
|
||||
cp.BondLPInterval = new(uint32)
|
||||
*cp.BondLPInterval = *o.BondLPInterval
|
||||
}
|
||||
if o.BondPacketsPerSlave != nil {
|
||||
cp.BondPacketsPerSlave = new(uint32)
|
||||
*cp.BondPacketsPerSlave = *o.BondPacketsPerSlave
|
||||
}
|
||||
if o.BondNumPeerNotif != nil {
|
||||
cp.BondNumPeerNotif = new(uint8)
|
||||
*cp.BondNumPeerNotif = *o.BondNumPeerNotif
|
||||
}
|
||||
if o.BondTLBDynamicLB != nil {
|
||||
cp.BondTLBDynamicLB = new(uint8)
|
||||
*cp.BondTLBDynamicLB = *o.BondTLBDynamicLB
|
||||
}
|
||||
if o.BondAllSlavesActive != nil {
|
||||
cp.BondAllSlavesActive = new(uint8)
|
||||
*cp.BondAllSlavesActive = *o.BondAllSlavesActive
|
||||
}
|
||||
if o.BondPeerNotifyDelay != nil {
|
||||
cp.BondPeerNotifyDelay = new(uint32)
|
||||
*cp.BondPeerNotifyDelay = *o.BondPeerNotifyDelay
|
||||
}
|
||||
if o.BondMissedMax != nil {
|
||||
cp.BondMissedMax = new(uint8)
|
||||
*cp.BondMissedMax = *o.BondMissedMax
|
||||
}
|
||||
if o.CommonLinkConfig.LinkUp != nil {
|
||||
cp.CommonLinkConfig.LinkUp = new(bool)
|
||||
*cp.CommonLinkConfig.LinkUp = *o.CommonLinkConfig.LinkUp
|
||||
}
|
||||
if o.CommonLinkConfig.LinkAddresses != nil {
|
||||
cp.CommonLinkConfig.LinkAddresses = make([]AddressConfig, len(o.CommonLinkConfig.LinkAddresses))
|
||||
copy(cp.CommonLinkConfig.LinkAddresses, o.CommonLinkConfig.LinkAddresses)
|
||||
for i3 := range o.CommonLinkConfig.LinkAddresses {
|
||||
if o.CommonLinkConfig.LinkAddresses[i3].AddressPriority != nil {
|
||||
cp.CommonLinkConfig.LinkAddresses[i3].AddressPriority = new(uint32)
|
||||
*cp.CommonLinkConfig.LinkAddresses[i3].AddressPriority = *o.CommonLinkConfig.LinkAddresses[i3].AddressPriority
|
||||
}
|
||||
}
|
||||
}
|
||||
if o.CommonLinkConfig.LinkRoutes != nil {
|
||||
cp.CommonLinkConfig.LinkRoutes = make([]RouteConfig, len(o.CommonLinkConfig.LinkRoutes))
|
||||
copy(cp.CommonLinkConfig.LinkRoutes, o.CommonLinkConfig.LinkRoutes)
|
||||
}
|
||||
return &cp
|
||||
}
|
||||
|
||||
// DeepCopy generates a deep copy of *DefaultActionConfigV1Alpha1.
|
||||
func (o *DefaultActionConfigV1Alpha1) DeepCopy() *DefaultActionConfigV1Alpha1 {
|
||||
var cp DefaultActionConfigV1Alpha1 = *o
|
||||
|
||||
@ -38,6 +38,7 @@ func init() {
|
||||
|
||||
func conflictingLinkKinds(selfKind string) []string {
|
||||
return xslices.Filter([]string{
|
||||
BondKind,
|
||||
DummyLinkKind,
|
||||
LinkKind,
|
||||
VLANKind,
|
||||
|
||||
@ -5,6 +5,6 @@
|
||||
// Package network provides network machine configuration documents.
|
||||
package network
|
||||
|
||||
//go:generate go tool github.com/siderolabs/talos/tools/docgen -output network_doc.go network.go default_action_config.go dhcp4.go dhcp6.go dummy.go ethernet.go hcloud_vip.go hostname.go kubespan_endpoints.go layer2_vip.go link.go link_alias.go port_range.go rule_config.go static_host.go vlan.go
|
||||
//go:generate go tool github.com/siderolabs/talos/tools/docgen -output network_doc.go network.go bond.go default_action_config.go dhcp4.go dhcp6.go dummy.go ethernet.go hcloud_vip.go hostname.go kubespan_endpoints.go layer2_vip.go link.go link_alias.go port_range.go rule_config.go static_host.go vlan.go
|
||||
|
||||
//go:generate go tool github.com/siderolabs/deep-copy -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type VLANConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go .
|
||||
//go:generate go tool github.com/siderolabs/deep-copy -type BondConfigV1Alpha1 -type DefaultActionConfigV1Alpha1 -type DHCPv4ConfigV1Alpha1 -type DHCPv6ConfigV1Alpha1 -type DummyLinkConfigV1Alpha1 -type EthernetConfigV1Alpha1 -type HCloudVIPConfigV1Alpha1 -type HostnameConfigV1Alpha1 -type KubespanEndpointsConfigV1Alpha1 -type Layer2VIPConfigV1Alpha1 -type LinkConfigV1Alpha1 -type LinkAliasConfigV1Alpha1 -type RuleConfigV1Alpha1 -type StaticHostConfigV1Alpha1 -type VLANConfigV1Alpha1 -pointer-receiver -header-file ../../../../../hack/boilerplate.txt -o deep_copy.generated.go .
|
||||
|
||||
@ -13,6 +13,313 @@ import (
|
||||
"github.com/siderolabs/talos/pkg/machinery/nethelpers"
|
||||
)
|
||||
|
||||
func (BondConfigV1Alpha1) Doc() *encoder.Doc {
|
||||
doc := &encoder.Doc{
|
||||
Type: "BondConfig",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "BondConfig is a config document to create a bond (link aggregation) over a set of links." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Description: "BondConfig is a config document to create a bond (link aggregation) over a set of links.",
|
||||
Fields: []encoder.Doc{
|
||||
{
|
||||
Type: "Meta",
|
||||
Inline: true,
|
||||
},
|
||||
{
|
||||
Name: "name",
|
||||
Type: "string",
|
||||
Note: "",
|
||||
Description: "Name of the bond link (interface) to be created.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Name of the bond link (interface) to be created." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "hardwareAddr",
|
||||
Type: "HardwareAddr",
|
||||
Note: "",
|
||||
Description: "Override the hardware (MAC) address of the link.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Override the hardware (MAC) address of the link." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "links",
|
||||
Type: "[]string",
|
||||
Note: "",
|
||||
Description: "Names of the links (interfaces) on which the bond will be created.\nLink aliases can be used here as well.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Names of the links (interfaces) on which the bond will be created." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "bondMode",
|
||||
Type: "BondMode",
|
||||
Note: "",
|
||||
Description: "Bond mode.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Bond mode." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"balance-rr",
|
||||
"active-backup",
|
||||
"balance-xor",
|
||||
"broadcast",
|
||||
"802.3ad",
|
||||
"balance-tlb",
|
||||
"balance-alb",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "miimon",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "Link monitoring frequency in milliseconds.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Link monitoring frequency in milliseconds." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "updelay",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "downdelay",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "The time, in milliseconds, to wait before disabling a slave after a link failure has been detected.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The time, in milliseconds, to wait before disabling a slave after a link failure has been detected." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "useCarrier",
|
||||
Type: "bool",
|
||||
Note: "",
|
||||
Description: "Specifies whether or not miimon should use MII or ETHTOOL.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Specifies whether or not miimon should use MII or ETHTOOL." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "xmitHashPolicy",
|
||||
Type: "BondXmitHashPolicy",
|
||||
Note: "",
|
||||
Description: "Selects the transmit hash policy to use for slave selection.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Selects the transmit hash policy to use for slave selection." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"layer2",
|
||||
"layer3+4",
|
||||
"layer2+3",
|
||||
"encap2+3",
|
||||
"encap3+4",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "arpInterval",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "ARP link monitoring frequency in milliseconds.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "ARP link monitoring frequency in milliseconds." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "arpIpTargets",
|
||||
Type: "[]Addr",
|
||||
Note: "",
|
||||
Description: "The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "nsIp6Targets",
|
||||
Type: "[]Addr",
|
||||
Note: "",
|
||||
Description: "The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The list of IPv6 addresses to use for NS link monitoring when arpInterval is set." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "arpValidate",
|
||||
Type: "ARPValidate",
|
||||
Note: "",
|
||||
Description: "Specifies whether or not ARP probes and replies should be validated.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Specifies whether or not ARP probes and replies should be validated." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"none",
|
||||
"active",
|
||||
"backup",
|
||||
"all",
|
||||
"filter",
|
||||
"filter-active",
|
||||
"filter-backup",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "arpAllTargets",
|
||||
Type: "ARPAllTargets",
|
||||
Note: "",
|
||||
Description: "Specifies whether ARP probes should be sent to any or all targets.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Specifies whether ARP probes should be sent to any or all targets." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"any",
|
||||
"all",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "lacpRate",
|
||||
Type: "LACPRate",
|
||||
Note: "",
|
||||
Description: "LACPDU frames periodic transmission rate.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "LACPDU frames periodic transmission rate." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"slow",
|
||||
"fast",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "failOverMac",
|
||||
Type: "FailOverMAC",
|
||||
Note: "",
|
||||
Description: "Specifies whether active-backup mode should set all slaves to the same MAC address\nat enslavement, when enabled, or perform special handling.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Specifies whether active-backup mode should set all slaves to the same MAC address" /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"none",
|
||||
"active",
|
||||
"follow",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "adSelect",
|
||||
Type: "ADSelect",
|
||||
Note: "",
|
||||
Description: "Aggregate selection policy for 802.3ad.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Aggregate selection policy for 802.3ad." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"stable",
|
||||
"bandwidth",
|
||||
"count",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "adActorSysPrio",
|
||||
Type: "uint16",
|
||||
Note: "",
|
||||
Description: "Actor system priority for 802.3ad.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Actor system priority for 802.3ad." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "adUserPortKey",
|
||||
Type: "uint16",
|
||||
Note: "",
|
||||
Description: "User port key (upper 10 bits) for 802.3ad.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "User port key (upper 10 bits) for 802.3ad." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "adLACPActive",
|
||||
Type: "ADLACPActive",
|
||||
Note: "",
|
||||
Description: "Whether to send LACPDU frames periodically.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Whether to send LACPDU frames periodically." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"on",
|
||||
"off",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "primaryReselect",
|
||||
Type: "PrimaryReselect",
|
||||
Note: "",
|
||||
Description: "Policy under which the primary slave should be reselected.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Policy under which the primary slave should be reselected." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Values: []string{
|
||||
"always",
|
||||
"better",
|
||||
"failure",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "resendIGMP",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "The number of times IGMP packets should be resent.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The number of times IGMP packets should be resent." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "minLinks",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "The minimum number of active links required for the bond to be considered active.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The minimum number of active links required for the bond to be considered active." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "lpInterval",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "The number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "packetsPerSlave",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "The number of packets to transmit through a slave before moving to the next one.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The number of packets to transmit through a slave before moving to the next one." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "numPeerNotif",
|
||||
Type: "uint8",
|
||||
Note: "",
|
||||
Description: "The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)\nto be issued after a failover event.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)" /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "tlbLogicalLb",
|
||||
Type: "uint8",
|
||||
Note: "",
|
||||
Description: "Whether dynamic shuffling of flows is enabled in tlb or alb mode.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Whether dynamic shuffling of flows is enabled in tlb or alb mode." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "allSlavesActive",
|
||||
Type: "uint8",
|
||||
Note: "",
|
||||
Description: "Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1)." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "peerNotifDelay",
|
||||
Type: "uint32",
|
||||
Note: "",
|
||||
Description: "The delay, in milliseconds, between each peer notification.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The delay, in milliseconds, between each peer notification." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Name: "missedMax",
|
||||
Type: "uint8",
|
||||
Note: "",
|
||||
Description: "The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
Type: "CommonLinkConfig",
|
||||
Inline: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
doc.AddExample("", exampleBondConfigV1Alpha1())
|
||||
|
||||
doc.Fields[1].AddExample("", "bond.ext")
|
||||
doc.Fields[2].AddExample("", nethelpers.HardwareAddr{0x2e, 0x3c, 0x4d, 0x5e, 0x6f, 0x70})
|
||||
doc.Fields[3].AddExample("", []string{"enp0s3", "enp0s8"})
|
||||
doc.Fields[4].AddExample("", "802.3ad")
|
||||
doc.Fields[5].AddExample("", 200)
|
||||
doc.Fields[6].AddExample("", 300)
|
||||
doc.Fields[7].AddExample("", 100)
|
||||
doc.Fields[9].AddExample("", "layer2")
|
||||
doc.Fields[10].AddExample("", 1000)
|
||||
doc.Fields[11].AddExample("", []netip.Addr{netip.MustParseAddr("10.15.0.1")})
|
||||
doc.Fields[12].AddExample("", []netip.Addr{netip.MustParseAddr("fd00::1")})
|
||||
doc.Fields[13].AddExample("", "active")
|
||||
doc.Fields[14].AddExample("", "all")
|
||||
doc.Fields[15].AddExample("", "fast")
|
||||
doc.Fields[16].AddExample("", "active")
|
||||
doc.Fields[17].AddExample("", "stable")
|
||||
doc.Fields[18].AddExample("", 65535)
|
||||
doc.Fields[19].AddExample("", 0)
|
||||
doc.Fields[20].AddExample("", "on")
|
||||
doc.Fields[21].AddExample("", "always")
|
||||
doc.Fields[27].AddExample("", 1)
|
||||
doc.Fields[28].AddExample("", 0)
|
||||
|
||||
return doc
|
||||
}
|
||||
|
||||
func (DefaultActionConfigV1Alpha1) Doc() *encoder.Doc {
|
||||
doc := &encoder.Doc{
|
||||
Type: "NetworkDefaultActionConfig",
|
||||
@ -583,6 +890,10 @@ func (CommonLinkConfig) Doc() *encoder.Doc {
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "CommonLinkConfig is common configuration for network links, and logical links." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
Description: "CommonLinkConfig is common configuration for network links, and logical links.",
|
||||
AppearsIn: []encoder.Appearance{
|
||||
{
|
||||
TypeName: "BondConfigV1Alpha1",
|
||||
FieldName: "",
|
||||
},
|
||||
{
|
||||
TypeName: "DummyLinkConfigV1Alpha1",
|
||||
FieldName: "",
|
||||
@ -980,7 +1291,7 @@ func (VLANConfigV1Alpha1) Doc() *encoder.Doc {
|
||||
Name: "parent",
|
||||
Type: "string",
|
||||
Note: "",
|
||||
Description: "Name of the parent link (interface) on which the VLAN link will be created.",
|
||||
Description: "Name of the parent link (interface) on which the VLAN link will be created.\nLink aliases can be used here as well.",
|
||||
Comments: [3]string{"" /* encoder.HeadComment */, "Name of the parent link (interface) on which the VLAN link will be created." /* encoder.LineComment */, "" /* encoder.FootComment */},
|
||||
},
|
||||
{
|
||||
@ -1006,6 +1317,7 @@ func GetFileDoc() *encoder.FileDoc {
|
||||
Name: "network",
|
||||
Description: "Package network provides network machine configuration documents.\n",
|
||||
Structs: []*encoder.Doc{
|
||||
BondConfigV1Alpha1{}.Doc(),
|
||||
DefaultActionConfigV1Alpha1{}.Doc(),
|
||||
DHCPv4ConfigV1Alpha1{}.Doc(),
|
||||
DHCPv6ConfigV1Alpha1{}.Doc(),
|
||||
|
||||
18
pkg/machinery/config/types/network/testdata/bondconfig.yaml
vendored
Normal file
18
pkg/machinery/config/types/network/testdata/bondconfig.yaml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: v1alpha1
|
||||
kind: BondConfig
|
||||
name: agg.0
|
||||
links:
|
||||
- eth0
|
||||
- eth1
|
||||
bondMode: 802.3ad
|
||||
miimon: 100
|
||||
updelay: 200
|
||||
downdelay: 200
|
||||
xmitHashPolicy: layer3+4
|
||||
lacpRate: slow
|
||||
adActorSysPrio: 65535
|
||||
resendIGMP: 1
|
||||
packetsPerSlave: 1
|
||||
up: true
|
||||
addresses:
|
||||
- address: 1.2.3.4/24
|
||||
@ -80,6 +80,7 @@ type VLANConfigV1Alpha1 struct {
|
||||
VLANModeConfig *nethelpers.VLANProtocol `yaml:"vlanMode,omitempty"`
|
||||
// description: |
|
||||
// Name of the parent link (interface) on which the VLAN link will be created.
|
||||
// Link aliases can be used here as well.
|
||||
//
|
||||
// examples:
|
||||
// - value: >
|
||||
|
||||
16
pkg/machinery/nethelpers/adlacpactive.go
Normal file
16
pkg/machinery/nethelpers/adlacpactive.go
Normal file
@ -0,0 +1,16 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package nethelpers
|
||||
|
||||
// ADLACPActive is ADLACPActive.
|
||||
type ADLACPActive uint8
|
||||
|
||||
// ADLACPActive constants.
|
||||
//
|
||||
//structprotogen:gen_enum
|
||||
const (
|
||||
ADLACPActiveOff ADLACPActive = iota // off
|
||||
ADLACPActiveOn // on
|
||||
)
|
||||
@ -1,4 +1,4 @@
|
||||
// Code generated by "enumer -type=ARPAllTargets,ARPValidate,AddressFlag,AddressSortAlgorithm,ADSelect,AutoHostnameKind,BondMode,BondXmitHashPolicy,ClientIdentifier,ConntrackState,DefaultAction,Duplex,Family,LACPRate,LinkFlag,LinkType,MatchOperator,NfTablesChainHook,NfTablesChainPriority,NfTablesVerdict,OperationalState,Port,PrimaryReselect,Protocol,RouteFlag,RouteProtocol,RouteType,RoutingTable,Scope,Status,VLANProtocol,WOLMode -linecomment -text"; DO NOT EDIT.
|
||||
// Code generated by "enumer -type=ARPAllTargets,ARPValidate,AddressFlag,AddressSortAlgorithm,ADSelect,ADLACPActive,AutoHostnameKind,BondMode,BondXmitHashPolicy,ClientIdentifier,ConntrackState,DefaultAction,Duplex,Family,LACPRate,LinkFlag,LinkType,MatchOperator,NfTablesChainHook,NfTablesChainPriority,NfTablesVerdict,OperationalState,Port,PrimaryReselect,Protocol,RouteFlag,RouteProtocol,RouteType,RoutingTable,Scope,Status,VLANProtocol,WOLMode -linecomment -text"; DO NOT EDIT.
|
||||
|
||||
package nethelpers
|
||||
|
||||
@ -89,11 +89,11 @@ func (i *ARPAllTargets) UnmarshalText(text []byte) error {
|
||||
return err
|
||||
}
|
||||
|
||||
const _ARPValidateName = "noneactivebackupall"
|
||||
const _ARPValidateName = "noneactivebackupallfilterfilter-activefilter-backup"
|
||||
|
||||
var _ARPValidateIndex = [...]uint8{0, 4, 10, 16, 19}
|
||||
var _ARPValidateIndex = [...]uint8{0, 4, 10, 16, 19, 25, 38, 51}
|
||||
|
||||
const _ARPValidateLowerName = "noneactivebackupall"
|
||||
const _ARPValidateLowerName = "noneactivebackupallfilterfilter-activefilter-backup"
|
||||
|
||||
func (i ARPValidate) String() string {
|
||||
if i >= ARPValidate(len(_ARPValidateIndex)-1) {
|
||||
@ -110,9 +110,12 @@ func _ARPValidateNoOp() {
|
||||
_ = x[ARPValidateActive-(1)]
|
||||
_ = x[ARPValidateBackup-(2)]
|
||||
_ = x[ARPValidateAll-(3)]
|
||||
_ = x[ARPValidateFilter-(4)]
|
||||
_ = x[ARPValidateFilterActive-(5)]
|
||||
_ = x[ARPValidateFilterBackup-(6)]
|
||||
}
|
||||
|
||||
var _ARPValidateValues = []ARPValidate{ARPValidateNone, ARPValidateActive, ARPValidateBackup, ARPValidateAll}
|
||||
var _ARPValidateValues = []ARPValidate{ARPValidateNone, ARPValidateActive, ARPValidateBackup, ARPValidateAll, ARPValidateFilter, ARPValidateFilterActive, ARPValidateFilterBackup}
|
||||
|
||||
var _ARPValidateNameToValueMap = map[string]ARPValidate{
|
||||
_ARPValidateName[0:4]: ARPValidateNone,
|
||||
@ -123,6 +126,12 @@ var _ARPValidateNameToValueMap = map[string]ARPValidate{
|
||||
_ARPValidateLowerName[10:16]: ARPValidateBackup,
|
||||
_ARPValidateName[16:19]: ARPValidateAll,
|
||||
_ARPValidateLowerName[16:19]: ARPValidateAll,
|
||||
_ARPValidateName[19:25]: ARPValidateFilter,
|
||||
_ARPValidateLowerName[19:25]: ARPValidateFilter,
|
||||
_ARPValidateName[25:38]: ARPValidateFilterActive,
|
||||
_ARPValidateLowerName[25:38]: ARPValidateFilterActive,
|
||||
_ARPValidateName[38:51]: ARPValidateFilterBackup,
|
||||
_ARPValidateLowerName[38:51]: ARPValidateFilterBackup,
|
||||
}
|
||||
|
||||
var _ARPValidateNames = []string{
|
||||
@ -130,6 +139,9 @@ var _ARPValidateNames = []string{
|
||||
_ARPValidateName[4:10],
|
||||
_ARPValidateName[10:16],
|
||||
_ARPValidateName[16:19],
|
||||
_ARPValidateName[19:25],
|
||||
_ARPValidateName[25:38],
|
||||
_ARPValidateName[38:51],
|
||||
}
|
||||
|
||||
// ARPValidateString retrieves an enum value from the enum constants string name.
|
||||
@ -477,6 +489,88 @@ func (i *ADSelect) UnmarshalText(text []byte) error {
|
||||
return err
|
||||
}
|
||||
|
||||
const _ADLACPActiveName = "offon"
|
||||
|
||||
var _ADLACPActiveIndex = [...]uint8{0, 3, 5}
|
||||
|
||||
const _ADLACPActiveLowerName = "offon"
|
||||
|
||||
func (i ADLACPActive) String() string {
|
||||
if i >= ADLACPActive(len(_ADLACPActiveIndex)-1) {
|
||||
return fmt.Sprintf("ADLACPActive(%d)", i)
|
||||
}
|
||||
return _ADLACPActiveName[_ADLACPActiveIndex[i]:_ADLACPActiveIndex[i+1]]
|
||||
}
|
||||
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
func _ADLACPActiveNoOp() {
|
||||
var x [1]struct{}
|
||||
_ = x[ADLACPActiveOff-(0)]
|
||||
_ = x[ADLACPActiveOn-(1)]
|
||||
}
|
||||
|
||||
var _ADLACPActiveValues = []ADLACPActive{ADLACPActiveOff, ADLACPActiveOn}
|
||||
|
||||
var _ADLACPActiveNameToValueMap = map[string]ADLACPActive{
|
||||
_ADLACPActiveName[0:3]: ADLACPActiveOff,
|
||||
_ADLACPActiveLowerName[0:3]: ADLACPActiveOff,
|
||||
_ADLACPActiveName[3:5]: ADLACPActiveOn,
|
||||
_ADLACPActiveLowerName[3:5]: ADLACPActiveOn,
|
||||
}
|
||||
|
||||
var _ADLACPActiveNames = []string{
|
||||
_ADLACPActiveName[0:3],
|
||||
_ADLACPActiveName[3:5],
|
||||
}
|
||||
|
||||
// ADLACPActiveString retrieves an enum value from the enum constants string name.
|
||||
// Throws an error if the param is not part of the enum.
|
||||
func ADLACPActiveString(s string) (ADLACPActive, error) {
|
||||
if val, ok := _ADLACPActiveNameToValueMap[s]; ok {
|
||||
return val, nil
|
||||
}
|
||||
|
||||
if val, ok := _ADLACPActiveNameToValueMap[strings.ToLower(s)]; ok {
|
||||
return val, nil
|
||||
}
|
||||
return 0, fmt.Errorf("%s does not belong to ADLACPActive values", s)
|
||||
}
|
||||
|
||||
// ADLACPActiveValues returns all values of the enum
|
||||
func ADLACPActiveValues() []ADLACPActive {
|
||||
return _ADLACPActiveValues
|
||||
}
|
||||
|
||||
// ADLACPActiveStrings returns a slice of all String values of the enum
|
||||
func ADLACPActiveStrings() []string {
|
||||
strs := make([]string, len(_ADLACPActiveNames))
|
||||
copy(strs, _ADLACPActiveNames)
|
||||
return strs
|
||||
}
|
||||
|
||||
// IsAADLACPActive returns "true" if the value is listed in the enum definition. "false" otherwise
|
||||
func (i ADLACPActive) IsAADLACPActive() bool {
|
||||
for _, v := range _ADLACPActiveValues {
|
||||
if i == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MarshalText implements the encoding.TextMarshaler interface for ADLACPActive
|
||||
func (i ADLACPActive) MarshalText() ([]byte, error) {
|
||||
return []byte(i.String()), nil
|
||||
}
|
||||
|
||||
// UnmarshalText implements the encoding.TextUnmarshaler interface for ADLACPActive
|
||||
func (i *ADLACPActive) UnmarshalText(text []byte) error {
|
||||
var err error
|
||||
*i, err = ADLACPActiveString(string(text))
|
||||
return err
|
||||
}
|
||||
|
||||
const _AutoHostnameKindName = "offtalos-addrstable"
|
||||
|
||||
var _AutoHostnameKindIndex = [...]uint8{0, 3, 13, 19}
|
||||
|
||||
@ -17,6 +17,9 @@ const (
|
||||
ARPValidateActive // active
|
||||
ARPValidateBackup // backup
|
||||
ARPValidateAll // all
|
||||
ARPValidateFilter // filter
|
||||
ARPValidateFilterActive // filter-active
|
||||
ARPValidateFilterBackup // filter-backup
|
||||
)
|
||||
|
||||
// ARPValidateByName parses ARPValidate.
|
||||
@ -30,6 +33,12 @@ func ARPValidateByName(a string) (ARPValidate, error) {
|
||||
return ARPValidateBackup, nil
|
||||
case "all":
|
||||
return ARPValidateAll, nil
|
||||
case "filter":
|
||||
return ARPValidateFilter, nil
|
||||
case "filter-active":
|
||||
return ARPValidateFilterActive, nil
|
||||
case "filter-backup":
|
||||
return ARPValidateFilterBackup, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("invalid arp_validate mode %v", a)
|
||||
}
|
||||
|
||||
@ -5,5 +5,5 @@
|
||||
// Package nethelpers provides types and type wrappers to support network resources.
|
||||
package nethelpers
|
||||
|
||||
//go:generate go tool github.com/dmarkham/enumer -type=ARPAllTargets,ARPValidate,AddressFlag,AddressSortAlgorithm,ADSelect,AutoHostnameKind,BondMode,BondXmitHashPolicy,ClientIdentifier,ConntrackState,DefaultAction,Duplex,Family,LACPRate,LinkFlag,LinkType,MatchOperator,NfTablesChainHook,NfTablesChainPriority,NfTablesVerdict,OperationalState,Port,PrimaryReselect,Protocol,RouteFlag,RouteProtocol,RouteType,RoutingTable,Scope,Status,VLANProtocol,WOLMode -linecomment -text
|
||||
//go:generate go tool github.com/dmarkham/enumer -type=ARPAllTargets,ARPValidate,AddressFlag,AddressSortAlgorithm,ADSelect,ADLACPActive,AutoHostnameKind,BondMode,BondXmitHashPolicy,ClientIdentifier,ConntrackState,DefaultAction,Duplex,Family,LACPRate,LinkFlag,LinkType,MatchOperator,NfTablesChainHook,NfTablesChainPriority,NfTablesVerdict,OperationalState,Port,PrimaryReselect,Protocol,RouteFlag,RouteProtocol,RouteType,RoutingTable,Scope,Status,VLANProtocol,WOLMode -linecomment -text
|
||||
//go:generate go tool github.com/dmarkham/enumer -type=FailOverMAC -linecomment
|
||||
|
||||
@ -16,7 +16,7 @@ import (
|
||||
"github.com/siderolabs/talos/pkg/machinery/proto"
|
||||
)
|
||||
|
||||
//go:generate go tool github.com/siderolabs/deep-copy -type AddressSpecSpec -type AddressStatusSpec -type DNSResolveCacheSpec -type EthernetSpecSpec -type EthernetStatusSpec -type HardwareAddrSpec -type HostDNSConfigSpec -type HostnameSpecSpec -type HostnameStatusSpec -type LinkAliasSpecSpec -type LinkRefreshSpec -type LinkSpecSpec -type LinkStatusSpec -type NfTablesChainSpec -type NodeAddressSpec -type NodeAddressSortAlgorithmSpec -type NodeAddressFilterSpec -type OperatorSpecSpec -type PlatformConfigSpec -type ProbeSpecSpec -type ProbeStatusSpec -type ResolverSpecSpec -type ResolverStatusSpec -type RouteSpecSpec -type RouteStatusSpec -type StatusSpec -type TimeServerSpecSpec -type TimeServerStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
|
||||
//go:generate go tool github.com/siderolabs/deep-copy -type AddressSpecSpec -type AddressStatusSpec -type BondMasterSpec -type DNSResolveCacheSpec -type EthernetSpecSpec -type EthernetStatusSpec -type HardwareAddrSpec -type HostDNSConfigSpec -type HostnameSpecSpec -type HostnameStatusSpec -type LinkAliasSpecSpec -type LinkRefreshSpec -type LinkSpecSpec -type LinkStatusSpec -type NfTablesChainSpec -type NodeAddressSpec -type NodeAddressSortAlgorithmSpec -type NodeAddressFilterSpec -type OperatorSpecSpec -type PlatformConfigSpec -type ProbeSpecSpec -type ProbeStatusSpec -type ResolverSpecSpec -type ResolverStatusSpec -type RouteSpecSpec -type RouteStatusSpec -type StatusSpec -type TimeServerSpecSpec -type TimeServerStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
|
||||
|
||||
// AddressSpecType is type of AddressSpec resource.
|
||||
const AddressSpecType = resource.Type("AddressSpecs.net.talos.dev")
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
// Code generated by "deep-copy -type AddressSpecSpec -type AddressStatusSpec -type DNSResolveCacheSpec -type EthernetSpecSpec -type EthernetStatusSpec -type HardwareAddrSpec -type HostDNSConfigSpec -type HostnameSpecSpec -type HostnameStatusSpec -type LinkAliasSpecSpec -type LinkRefreshSpec -type LinkSpecSpec -type LinkStatusSpec -type NfTablesChainSpec -type NodeAddressSpec -type NodeAddressSortAlgorithmSpec -type NodeAddressFilterSpec -type OperatorSpecSpec -type PlatformConfigSpec -type ProbeSpecSpec -type ProbeStatusSpec -type ResolverSpecSpec -type ResolverStatusSpec -type RouteSpecSpec -type RouteStatusSpec -type StatusSpec -type TimeServerSpecSpec -type TimeServerStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
|
||||
// Code generated by "deep-copy -type AddressSpecSpec -type AddressStatusSpec -type BondMasterSpec -type DNSResolveCacheSpec -type EthernetSpecSpec -type EthernetStatusSpec -type HardwareAddrSpec -type HostDNSConfigSpec -type HostnameSpecSpec -type HostnameStatusSpec -type LinkAliasSpecSpec -type LinkRefreshSpec -type LinkSpecSpec -type LinkStatusSpec -type NfTablesChainSpec -type NodeAddressSpec -type NodeAddressSortAlgorithmSpec -type NodeAddressFilterSpec -type OperatorSpecSpec -type PlatformConfigSpec -type ProbeSpecSpec -type ProbeStatusSpec -type ResolverSpecSpec -type ResolverStatusSpec -type RouteSpecSpec -type RouteStatusSpec -type StatusSpec -type TimeServerSpecSpec -type TimeServerStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go ."; DO NOT EDIT.
|
||||
|
||||
package network
|
||||
|
||||
@ -24,6 +24,24 @@ func (o AddressStatusSpec) DeepCopy() AddressStatusSpec {
|
||||
return cp
|
||||
}
|
||||
|
||||
// DeepCopy generates a deep copy of BondMasterSpec.
|
||||
func (o BondMasterSpec) DeepCopy() BondMasterSpec {
|
||||
var cp BondMasterSpec = o
|
||||
if o.PrimaryIndex != nil {
|
||||
cp.PrimaryIndex = new(uint32)
|
||||
*cp.PrimaryIndex = *o.PrimaryIndex
|
||||
}
|
||||
if o.ARPIPTargets != nil {
|
||||
cp.ARPIPTargets = make([]netip.Addr, len(o.ARPIPTargets))
|
||||
copy(cp.ARPIPTargets, o.ARPIPTargets)
|
||||
}
|
||||
if o.NSIP6Targets != nil {
|
||||
cp.NSIP6Targets = make([]netip.Addr, len(o.NSIP6Targets))
|
||||
copy(cp.NSIP6Targets, o.NSIP6Targets)
|
||||
}
|
||||
return cp
|
||||
}
|
||||
|
||||
// DeepCopy generates a deep copy of DNSResolveCacheSpec.
|
||||
func (o DNSResolveCacheSpec) DeepCopy() DNSResolveCacheSpec {
|
||||
var cp DNSResolveCacheSpec = o
|
||||
@ -279,6 +297,7 @@ func (o LinkSpecSpec) DeepCopy() LinkSpecSpec {
|
||||
cp.HardwareAddress = make([]byte, len(o.HardwareAddress))
|
||||
copy(cp.HardwareAddress, o.HardwareAddress)
|
||||
}
|
||||
cp.BondMaster = o.BondMaster.DeepCopy()
|
||||
if o.Wireguard.Peers != nil {
|
||||
cp.Wireguard.Peers = make([]WireguardPeer, len(o.Wireguard.Peers))
|
||||
copy(cp.Wireguard.Peers, o.Wireguard.Peers)
|
||||
@ -311,6 +330,7 @@ func (o LinkStatusSpec) DeepCopy() LinkStatusSpec {
|
||||
cp.BroadcastAddr = make([]byte, len(o.BroadcastAddr))
|
||||
copy(cp.BroadcastAddr, o.BroadcastAddr)
|
||||
}
|
||||
cp.BondMaster = o.BondMaster.DeepCopy()
|
||||
if o.Wireguard.Peers != nil {
|
||||
cp.Wireguard.Peers = make([]WireguardPeer, len(o.Wireguard.Peers))
|
||||
copy(cp.Wireguard.Peers, o.Wireguard.Peers)
|
||||
|
||||
@ -28,30 +28,236 @@ type VLANSpec struct {
|
||||
//
|
||||
//gotagsrewrite:gen
|
||||
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 uint32 `yaml:"primary,omitempty" protobuf:"6"`
|
||||
// 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"`
|
||||
}
|
||||
|
||||
// Equal checks two BondMasterSpecs for equality.
|
||||
//
|
||||
//nolint:gocyclo,cyclop
|
||||
func (spec *BondMasterSpec) Equal(other *BondMasterSpec) bool {
|
||||
if spec.Mode != other.Mode {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.HashPolicy != other.HashPolicy {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.LACPRate != other.LACPRate {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.ARPValidate != other.ARPValidate {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.ARPAllTargets != other.ARPAllTargets {
|
||||
return false
|
||||
}
|
||||
|
||||
if (spec.PrimaryIndex == nil) != (other.PrimaryIndex == nil) {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.PrimaryIndex != nil && other.PrimaryIndex != nil && *spec.PrimaryIndex != *other.PrimaryIndex {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.PrimaryReselect != other.PrimaryReselect {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.FailOverMac != other.FailOverMac {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.ADSelect != other.ADSelect {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.MIIMon != other.MIIMon {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.UpDelay != other.UpDelay {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.DownDelay != other.DownDelay {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.ARPInterval != other.ARPInterval {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.ResendIGMP != other.ResendIGMP {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.MinLinks != other.MinLinks {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.LPInterval != other.LPInterval {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.PacketsPerSlave != other.PacketsPerSlave {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.NumPeerNotif != other.NumPeerNotif {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.TLBDynamicLB != other.TLBDynamicLB {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.AllSlavesActive != other.AllSlavesActive {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.UseCarrier != other.UseCarrier {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.ADActorSysPrio != other.ADActorSysPrio {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.ADUserPortKey != other.ADUserPortKey {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.PeerNotifyDelay != other.PeerNotifyDelay {
|
||||
return false
|
||||
}
|
||||
|
||||
if len(spec.ARPIPTargets) != len(other.ARPIPTargets) {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := range spec.ARPIPTargets {
|
||||
if spec.ARPIPTargets[i] != other.ARPIPTargets[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if len(spec.NSIP6Targets) != len(other.NSIP6Targets) {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := range spec.NSIP6Targets {
|
||||
if spec.NSIP6Targets[i] != other.NSIP6Targets[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if spec.ADLACPActive != other.ADLACPActive {
|
||||
return false
|
||||
}
|
||||
|
||||
if spec.MissedMax != other.MissedMax {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// IsZero checks if the BondMasterSpec is zero value.
|
||||
//
|
||||
//nolint:gocyclo,cyclop
|
||||
func (spec *BondMasterSpec) IsZero() bool {
|
||||
return spec.Mode == 0 &&
|
||||
spec.HashPolicy == 0 &&
|
||||
spec.LACPRate == 0 &&
|
||||
spec.ARPValidate == 0 &&
|
||||
spec.ARPAllTargets == 0 &&
|
||||
spec.PrimaryIndex == nil &&
|
||||
spec.PrimaryReselect == 0 &&
|
||||
spec.FailOverMac == 0 &&
|
||||
spec.ADSelect == 0 &&
|
||||
spec.MIIMon == 0 &&
|
||||
spec.UpDelay == 0 &&
|
||||
spec.DownDelay == 0 &&
|
||||
spec.ARPInterval == 0 &&
|
||||
spec.ResendIGMP == 0 &&
|
||||
spec.MinLinks == 0 &&
|
||||
spec.LPInterval == 0 &&
|
||||
spec.PacketsPerSlave == 0 &&
|
||||
spec.NumPeerNotif == 0 &&
|
||||
spec.TLBDynamicLB == 0 &&
|
||||
spec.AllSlavesActive == 0 &&
|
||||
!spec.UseCarrier &&
|
||||
spec.ADActorSysPrio == 0 &&
|
||||
spec.ADUserPortKey == 0 &&
|
||||
spec.PeerNotifyDelay == 0 &&
|
||||
len(spec.ARPIPTargets) == 0 &&
|
||||
len(spec.NSIP6Targets) == 0 &&
|
||||
spec.ADLACPActive == 0 &&
|
||||
spec.MissedMax == 0
|
||||
}
|
||||
|
||||
// BridgeMasterSpec describes bridge settings if Kind == "bridge".
|
||||
|
||||
@ -96,10 +96,13 @@ func (spec *LinkSpecSpec) Merge(other *LinkSpecSpec) error {
|
||||
updateIfNotZero(&spec.ParentName, other.ParentName)
|
||||
updateIfNotZero(&spec.BondSlave, other.BondSlave)
|
||||
updateIfNotZero(&spec.VLAN, other.VLAN)
|
||||
updateIfNotZero(&spec.BondMaster, other.BondMaster)
|
||||
updateIfNotZero(&spec.BridgeMaster, other.BridgeMaster)
|
||||
updateIfNotZero(&spec.BridgeSlave, other.BridgeSlave)
|
||||
|
||||
if !other.BondMaster.IsZero() {
|
||||
spec.BondMaster = other.BondMaster.DeepCopy()
|
||||
}
|
||||
|
||||
if other.HardwareAddress != nil {
|
||||
spec.HardwareAddress = slices.Clone(other.HardwareAddress)
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
//nolint:dupl
|
||||
package network_test
|
||||
|
||||
import (
|
||||
@ -9,6 +10,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.yaml.in/yaml/v4"
|
||||
@ -40,7 +42,7 @@ func TestLinkSpecMarshalYAML(t *testing.T) {
|
||||
LACPRate: nethelpers.LACPRateFast,
|
||||
ARPValidate: nethelpers.ARPValidateAll,
|
||||
ARPAllTargets: nethelpers.ARPAllTargetsAny,
|
||||
PrimaryIndex: 3,
|
||||
PrimaryIndex: pointer.To[uint32](3),
|
||||
PrimaryReselect: nethelpers.PrimaryReselectBetter,
|
||||
FailOverMac: nethelpers.FailOverMACFollow,
|
||||
ADSelect: nethelpers.ADSelectCount,
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
//nolint:dupl
|
||||
package network_test
|
||||
|
||||
import (
|
||||
@ -11,6 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/mdlayher/ethtool"
|
||||
"github.com/siderolabs/go-pointer"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.yaml.in/yaml/v4"
|
||||
@ -63,7 +65,7 @@ func TestLinkStatusMarshalYAML(t *testing.T) {
|
||||
LACPRate: nethelpers.LACPRateFast,
|
||||
ARPValidate: nethelpers.ARPValidateAll,
|
||||
ARPAllTargets: nethelpers.ARPAllTargetsAny,
|
||||
PrimaryIndex: 3,
|
||||
PrimaryIndex: pointer.To[uint32](3),
|
||||
PrimaryReselect: nethelpers.PrimaryReselectBetter,
|
||||
FailOverMac: nethelpers.FailOverMACFollow,
|
||||
ADSelect: nethelpers.ADSelectCount,
|
||||
|
||||
@ -259,6 +259,7 @@ description: Talos gRPC API reference.
|
||||
- [CriImageCacheStatus](#talos.resource.definitions.enums.CriImageCacheStatus)
|
||||
- [KubespanPeerState](#talos.resource.definitions.enums.KubespanPeerState)
|
||||
- [MachineType](#talos.resource.definitions.enums.MachineType)
|
||||
- [NethelpersADLACPActive](#talos.resource.definitions.enums.NethelpersADLACPActive)
|
||||
- [NethelpersADSelect](#talos.resource.definitions.enums.NethelpersADSelect)
|
||||
- [NethelpersARPAllTargets](#talos.resource.definitions.enums.NethelpersARPAllTargets)
|
||||
- [NethelpersARPValidate](#talos.resource.definitions.enums.NethelpersARPValidate)
|
||||
@ -4597,6 +4598,18 @@ MachineType represents a machine type.
|
||||
|
||||
|
||||
|
||||
<a name="talos.resource.definitions.enums.NethelpersADLACPActive"></a>
|
||||
|
||||
### NethelpersADLACPActive
|
||||
NethelpersADLACPActive is ADLACPActive.
|
||||
|
||||
| Name | Number | Description |
|
||||
| ---- | ------ | ----------- |
|
||||
| ADLACP_ACTIVE_OFF | 0 | |
|
||||
| ADLACP_ACTIVE_ON | 1 | |
|
||||
|
||||
|
||||
|
||||
<a name="talos.resource.definitions.enums.NethelpersADSelect"></a>
|
||||
|
||||
### NethelpersADSelect
|
||||
@ -4633,6 +4646,9 @@ NethelpersARPValidate is an ARP Validation mode.
|
||||
| ARP_VALIDATE_ACTIVE | 1 | |
|
||||
| ARP_VALIDATE_BACKUP | 2 | |
|
||||
| ARP_VALIDATE_ALL | 3 | |
|
||||
| ARP_VALIDATE_FILTER | 4 | |
|
||||
| ARP_VALIDATE_FILTER_ACTIVE | 5 | |
|
||||
| ARP_VALIDATE_FILTER_BACKUP | 6 | |
|
||||
|
||||
|
||||
|
||||
@ -8337,6 +8353,10 @@ BondMasterSpec describes bond settings if Kind == "bond".
|
||||
| ad_actor_sys_prio | [uint32](#uint32) | | |
|
||||
| ad_user_port_key | [uint32](#uint32) | | |
|
||||
| peer_notify_delay | [uint32](#uint32) | | |
|
||||
| arpip_targets | [common.NetIP](#common.NetIP) | repeated | |
|
||||
| nsip6_targets | [common.NetIP](#common.NetIP) | repeated | |
|
||||
| adlacp_active | [talos.resource.definitions.enums.NethelpersADLACPActive](#talos.resource.definitions.enums.NethelpersADLACPActive) | | |
|
||||
| missed_max | [uint32](#uint32) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,213 @@
|
||||
---
|
||||
description: BondConfig is a config document to create a bond (link aggregation) over a set of links.
|
||||
title: BondConfig
|
||||
---
|
||||
|
||||
<!-- markdownlint-disable -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{{< highlight yaml >}}
|
||||
apiVersion: v1alpha1
|
||||
kind: BondConfig
|
||||
name: bond.int # Name of the bond link (interface) to be created.
|
||||
# Names of the links (interfaces) on which the bond will be created.
|
||||
links:
|
||||
- enp1s2
|
||||
- enp1s2
|
||||
bondMode: 802.3ad # Bond mode.
|
||||
miimon: 100 # Link monitoring frequency in milliseconds.
|
||||
updelay: 200 # The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.
|
||||
downdelay: 200 # The time, in milliseconds, to wait before disabling a slave after a link failure has been detected.
|
||||
xmitHashPolicy: layer3+4 # Selects the transmit hash policy to use for slave selection.
|
||||
lacpRate: slow # LACPDU frames periodic transmission rate.
|
||||
adActorSysPrio: 65535 # Actor system priority for 802.3ad.
|
||||
resendIGMP: 1 # The number of times IGMP packets should be resent.
|
||||
packetsPerSlave: 1 # The number of packets to transmit through a slave before moving to the next one.
|
||||
# Configure addresses to be statically assigned to the link.
|
||||
addresses:
|
||||
- address: 10.15.0.3/16 # IP address to be assigned to the link.
|
||||
# Configure routes to be statically created via the link.
|
||||
routes:
|
||||
- destination: 10.0.0.0/8 # The route's destination as an address prefix.
|
||||
gateway: 10.15.0.1 # The route's gateway (if empty, creates link scope route).
|
||||
|
||||
# # Override the hardware (MAC) address of the link.
|
||||
# hardwareAddr: 2e:3c:4d:5e:6f:70
|
||||
|
||||
# # ARP link monitoring frequency in milliseconds.
|
||||
# arpInterval: 1000
|
||||
|
||||
# # The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.
|
||||
# arpIpTargets:
|
||||
# - 10.15.0.1
|
||||
|
||||
# # The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.
|
||||
# nsIp6Targets:
|
||||
# - fd00::1
|
||||
|
||||
# # Specifies whether or not ARP probes and replies should be validated.
|
||||
# arpValidate: active
|
||||
|
||||
# # Specifies whether ARP probes should be sent to any or all targets.
|
||||
# arpAllTargets: all
|
||||
|
||||
# # Specifies whether active-backup mode should set all slaves to the same MAC address
|
||||
# failOverMac: active
|
||||
|
||||
# # Aggregate selection policy for 802.3ad.
|
||||
# adSelect: stable
|
||||
|
||||
# # Whether to send LACPDU frames periodically.
|
||||
# adLACPActive: on
|
||||
|
||||
# # Policy under which the primary slave should be reselected.
|
||||
# primaryReselect: always
|
||||
|
||||
# # Whether dynamic shuffling of flows is enabled in tlb or alb mode.
|
||||
# tlbLogicalLb: 1
|
||||
{{< /highlight >}}
|
||||
|
||||
|
||||
| Field | Type | Description | Value(s) |
|
||||
|-------|------|-------------|----------|
|
||||
|`name` |string |Name of the bond link (interface) to be created. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
name: bond.ext
|
||||
{{< /highlight >}}</details> | |
|
||||
|`hardwareAddr` |HardwareAddr |Override the hardware (MAC) address of the link. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
hardwareAddr: 2e:3c:4d:5e:6f:70
|
||||
{{< /highlight >}}</details> | |
|
||||
|`links` |[]string |Names of the links (interfaces) on which the bond will be created.<br>Link aliases can be used here as well. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
links:
|
||||
- enp0s3
|
||||
- enp0s8
|
||||
{{< /highlight >}}</details> | |
|
||||
|`bondMode` |BondMode |Bond mode. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
bondMode: 802.3ad
|
||||
{{< /highlight >}}</details> |`balance-rr`<br />`active-backup`<br />`balance-xor`<br />`broadcast`<br />`802.3ad`<br />`balance-tlb`<br />`balance-alb`<br /> |
|
||||
|`miimon` |uint32 |Link monitoring frequency in milliseconds. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
miimon: 200
|
||||
{{< /highlight >}}</details> | |
|
||||
|`updelay` |uint32 |The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
updelay: 300
|
||||
{{< /highlight >}}</details> | |
|
||||
|`downdelay` |uint32 |The time, in milliseconds, to wait before disabling a slave after a link failure has been detected. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
downdelay: 100
|
||||
{{< /highlight >}}</details> | |
|
||||
|`useCarrier` |bool |Specifies whether or not miimon should use MII or ETHTOOL. | |
|
||||
|`xmitHashPolicy` |BondXmitHashPolicy |Selects the transmit hash policy to use for slave selection. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
xmitHashPolicy: layer2
|
||||
{{< /highlight >}}</details> |`layer2`<br />`layer3+4`<br />`layer2+3`<br />`encap2+3`<br />`encap3+4`<br /> |
|
||||
|`arpInterval` |uint32 |ARP link monitoring frequency in milliseconds. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
arpInterval: 1000
|
||||
{{< /highlight >}}</details> | |
|
||||
|`arpIpTargets` |[]Addr |The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.<br>Maximum of 16 targets are supported. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
arpIpTargets:
|
||||
- 10.15.0.1
|
||||
{{< /highlight >}}</details> | |
|
||||
|`nsIp6Targets` |[]Addr |The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.<br>Maximum of 16 targets are supported. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
nsIp6Targets:
|
||||
- fd00::1
|
||||
{{< /highlight >}}</details> | |
|
||||
|`arpValidate` |ARPValidate |Specifies whether or not ARP probes and replies should be validated. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
arpValidate: active
|
||||
{{< /highlight >}}</details> |`none`<br />`active`<br />`backup`<br />`all`<br />`filter`<br />`filter-active`<br />`filter-backup`<br /> |
|
||||
|`arpAllTargets` |ARPAllTargets |Specifies whether ARP probes should be sent to any or all targets. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
arpAllTargets: all
|
||||
{{< /highlight >}}</details> |`any`<br />`all`<br /> |
|
||||
|`lacpRate` |LACPRate |LACPDU frames periodic transmission rate. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
lacpRate: fast
|
||||
{{< /highlight >}}</details> |`slow`<br />`fast`<br /> |
|
||||
|`failOverMac` |FailOverMAC |Specifies whether active-backup mode should set all slaves to the same MAC address<br>at enslavement, when enabled, or perform special handling. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
failOverMac: active
|
||||
{{< /highlight >}}</details> |`none`<br />`active`<br />`follow`<br /> |
|
||||
|`adSelect` |ADSelect |Aggregate selection policy for 802.3ad. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
adSelect: stable
|
||||
{{< /highlight >}}</details> |`stable`<br />`bandwidth`<br />`count`<br /> |
|
||||
|`adActorSysPrio` |uint16 |Actor system priority for 802.3ad. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
adActorSysPrio: 65535
|
||||
{{< /highlight >}}</details> | |
|
||||
|`adUserPortKey` |uint16 |User port key (upper 10 bits) for 802.3ad. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
adUserPortKey: 0
|
||||
{{< /highlight >}}</details> | |
|
||||
|`adLACPActive` |ADLACPActive |Whether to send LACPDU frames periodically. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
adLACPActive: on
|
||||
{{< /highlight >}}</details> |`on`<br />`off`<br /> |
|
||||
|`primaryReselect` |PrimaryReselect |Policy under which the primary slave should be reselected. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
primaryReselect: always
|
||||
{{< /highlight >}}</details> |`always`<br />`better`<br />`failure`<br /> |
|
||||
|`resendIGMP` |uint32 |The number of times IGMP packets should be resent. | |
|
||||
|`minLinks` |uint32 |The minimum number of active links required for the bond to be considered active. | |
|
||||
|`lpInterval` |uint32 |The number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch. | |
|
||||
|`packetsPerSlave` |uint32 |The number of packets to transmit through a slave before moving to the next one. | |
|
||||
|`numPeerNotif` |uint8 |The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)<br>to be issued after a failover event. | |
|
||||
|`tlbLogicalLb` |uint8 |Whether dynamic shuffling of flows is enabled in tlb or alb mode. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
tlbLogicalLb: 1
|
||||
{{< /highlight >}}</details> | |
|
||||
|`allSlavesActive` |uint8 |Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1). <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
allSlavesActive: 0
|
||||
{{< /highlight >}}</details> | |
|
||||
|`peerNotifDelay` |uint32 |The delay, in milliseconds, between each peer notification. | |
|
||||
|`missedMax` |uint8 |The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor. | |
|
||||
|`up` |bool |Bring the link up or down.<br><br>If not specified, the link will be brought up. | |
|
||||
|`mtu` |uint32 |Configure LinkMTU (Maximum Transmission Unit) for the link.<br><br>If not specified, the system default LinkMTU will be used (usually 1500). | |
|
||||
|`addresses` |<a href="#BondConfig.addresses.">[]AddressConfig</a> |Configure addresses to be statically assigned to the link. | |
|
||||
|`routes` |<a href="#BondConfig.routes.">[]RouteConfig</a> |Configure routes to be statically created via the link. | |
|
||||
|
||||
|
||||
|
||||
|
||||
## addresses[] {#BondConfig.addresses.}
|
||||
|
||||
AddressConfig represents a network address configuration.
|
||||
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Value(s) |
|
||||
|-------|------|-------------|----------|
|
||||
|`address` |Prefix |IP address to be assigned to the link.<br><br>This field must include the network prefix length (e.g. /24 for IPv4, /64 for IPv6). <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
address: 192.168.1.100/24
|
||||
{{< /highlight >}}{{< highlight yaml >}}
|
||||
address: fd00::1/64
|
||||
{{< /highlight >}}</details> | |
|
||||
|`routePriority` |uint32 |Configure the route priority (metric) for routes created for this address.<br><br>If not specified, the system default route priority will be used. | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## routes[] {#BondConfig.routes.}
|
||||
|
||||
RouteConfig represents a network route configuration.
|
||||
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Value(s) |
|
||||
|-------|------|-------------|----------|
|
||||
|`destination` |Prefix |The route's destination as an address prefix.<br><br>If not specified, a default route will be created for the address family of the gateway. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
destination: 10.0.0.0/8
|
||||
{{< /highlight >}}</details> | |
|
||||
|`gateway` |Addr |The route's gateway (if empty, creates link scope route). <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
gateway: 10.0.0.1
|
||||
{{< /highlight >}}</details> | |
|
||||
|`source` |Addr |The route's source address (optional). | |
|
||||
|`metric` |uint32 |The optional metric for the route. | |
|
||||
|`mtu` |uint32 |The optional MTU for the route. | |
|
||||
|`table` |RoutingTable |The routing table to use for the route.<br><br>If not specified, the main routing table will be used. | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ vlanID: 34
|
||||
|`vlanMode` |VLANProtocol |Set the VLAN mode to use.<br>If not set, defaults to '802.1q'. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
vlanMode: 802.1q
|
||||
{{< /highlight >}}</details> |`802.1q`<br />`802.1ad`<br /> |
|
||||
|`parent` |string |Name of the parent link (interface) on which the VLAN link will be created. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
|`parent` |string |Name of the parent link (interface) on which the VLAN link will be created.<br>Link aliases can be used here as well. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|
||||
parent: enp0s3
|
||||
{{< /highlight >}}</details> | |
|
||||
|`up` |bool |Bring the link up or down.<br><br>If not specified, the link will be brought up. | |
|
||||
|
||||
@ -758,6 +758,337 @@
|
||||
],
|
||||
"description": "AddressConfig represents a network address configuration."
|
||||
},
|
||||
"network.BondConfigV1Alpha1": {
|
||||
"properties": {
|
||||
"apiVersion": {
|
||||
"enum": [
|
||||
"v1alpha1"
|
||||
],
|
||||
"title": "apiVersion",
|
||||
"description": "apiVersion is the API version of the resource.\n",
|
||||
"markdownDescription": "apiVersion is the API version of the resource.",
|
||||
"x-intellij-html-description": "\u003cp\u003eapiVersion is the API version of the resource.\u003c/p\u003e\n"
|
||||
},
|
||||
"kind": {
|
||||
"enum": [
|
||||
"BondConfig"
|
||||
],
|
||||
"title": "kind",
|
||||
"description": "kind is the kind of the resource.\n",
|
||||
"markdownDescription": "kind is the kind of the resource.",
|
||||
"x-intellij-html-description": "\u003cp\u003ekind is the kind of the resource.\u003c/p\u003e\n"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "name",
|
||||
"description": "Name of the bond link (interface) to be created.\n",
|
||||
"markdownDescription": "Name of the bond link (interface) to be created.",
|
||||
"x-intellij-html-description": "\u003cp\u003eName of the bond link (interface) to be created.\u003c/p\u003e\n"
|
||||
},
|
||||
"hardwareAddr": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f:]+$",
|
||||
"title": "hardwareAddr",
|
||||
"description": "Override the hardware (MAC) address of the link.\n",
|
||||
"markdownDescription": "Override the hardware (MAC) address of the link.",
|
||||
"x-intellij-html-description": "\u003cp\u003eOverride the hardware (MAC) address of the link.\u003c/p\u003e\n"
|
||||
},
|
||||
"links": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "links",
|
||||
"description": "Names of the links (interfaces) on which the bond will be created.\nLink aliases can be used here as well.\n",
|
||||
"markdownDescription": "Names of the links (interfaces) on which the bond will be created.\nLink aliases can be used here as well.",
|
||||
"x-intellij-html-description": "\u003cp\u003eNames of the links (interfaces) on which the bond will be created.\nLink aliases can be used here as well.\u003c/p\u003e\n"
|
||||
},
|
||||
"bondMode": {
|
||||
"enum": [
|
||||
"balance-rr",
|
||||
"active-backup",
|
||||
"balance-xor",
|
||||
"broadcast",
|
||||
"802.3ad",
|
||||
"balance-tlb",
|
||||
"balance-alb"
|
||||
],
|
||||
"title": "bondMode",
|
||||
"description": "Bond mode.\n",
|
||||
"markdownDescription": "Bond mode.",
|
||||
"x-intellij-html-description": "\u003cp\u003eBond mode.\u003c/p\u003e\n"
|
||||
},
|
||||
"miimon": {
|
||||
"type": "integer",
|
||||
"title": "miimon",
|
||||
"description": "Link monitoring frequency in milliseconds.\n",
|
||||
"markdownDescription": "Link monitoring frequency in milliseconds.",
|
||||
"x-intellij-html-description": "\u003cp\u003eLink monitoring frequency in milliseconds.\u003c/p\u003e\n"
|
||||
},
|
||||
"updelay": {
|
||||
"type": "integer",
|
||||
"title": "updelay",
|
||||
"description": "The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.\n",
|
||||
"markdownDescription": "The time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe time, in milliseconds, to wait before enabling a slave after a link recovery has been detected.\u003c/p\u003e\n"
|
||||
},
|
||||
"downdelay": {
|
||||
"type": "integer",
|
||||
"title": "downdelay",
|
||||
"description": "The time, in milliseconds, to wait before disabling a slave after a link failure has been detected.\n",
|
||||
"markdownDescription": "The time, in milliseconds, to wait before disabling a slave after a link failure has been detected.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe time, in milliseconds, to wait before disabling a slave after a link failure has been detected.\u003c/p\u003e\n"
|
||||
},
|
||||
"useCarrier": {
|
||||
"type": "boolean",
|
||||
"title": "useCarrier",
|
||||
"description": "Specifies whether or not miimon should use MII or ETHTOOL.\n",
|
||||
"markdownDescription": "Specifies whether or not miimon should use MII or ETHTOOL.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether or not miimon should use MII or ETHTOOL.\u003c/p\u003e\n"
|
||||
},
|
||||
"xmitHashPolicy": {
|
||||
"enum": [
|
||||
"layer2",
|
||||
"layer3+4",
|
||||
"layer2+3",
|
||||
"encap2+3",
|
||||
"encap3+4"
|
||||
],
|
||||
"title": "xmitHashPolicy",
|
||||
"description": "Selects the transmit hash policy to use for slave selection.\n",
|
||||
"markdownDescription": "Selects the transmit hash policy to use for slave selection.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSelects the transmit hash policy to use for slave selection.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpInterval": {
|
||||
"type": "integer",
|
||||
"title": "arpInterval",
|
||||
"description": "ARP link monitoring frequency in milliseconds.\n",
|
||||
"markdownDescription": "ARP link monitoring frequency in milliseconds.",
|
||||
"x-intellij-html-description": "\u003cp\u003eARP link monitoring frequency in milliseconds.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpIpTargets": {
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f.:]+$"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "arpIpTargets",
|
||||
"description": "The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\n",
|
||||
"markdownDescription": "The list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe list of IPv4 addresses to use for ARP link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\u003c/p\u003e\n"
|
||||
},
|
||||
"nsIp6Targets": {
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f.:]+$"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "nsIp6Targets",
|
||||
"description": "The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\n",
|
||||
"markdownDescription": "The list of IPv6 addresses to use for NS link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe list of IPv6 addresses to use for NS link monitoring when arpInterval is set.\nMaximum of 16 targets are supported.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpValidate": {
|
||||
"enum": [
|
||||
"none",
|
||||
"active",
|
||||
"backup",
|
||||
"all",
|
||||
"filter",
|
||||
"filter-active",
|
||||
"filter-backup"
|
||||
],
|
||||
"title": "arpValidate",
|
||||
"description": "Specifies whether or not ARP probes and replies should be validated.\n",
|
||||
"markdownDescription": "Specifies whether or not ARP probes and replies should be validated.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether or not ARP probes and replies should be validated.\u003c/p\u003e\n"
|
||||
},
|
||||
"arpAllTargets": {
|
||||
"enum": [
|
||||
"any",
|
||||
"all"
|
||||
],
|
||||
"title": "arpAllTargets",
|
||||
"description": "Specifies whether ARP probes should be sent to any or all targets.\n",
|
||||
"markdownDescription": "Specifies whether ARP probes should be sent to any or all targets.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether ARP probes should be sent to any or all targets.\u003c/p\u003e\n"
|
||||
},
|
||||
"lacpRate": {
|
||||
"enum": [
|
||||
"slow",
|
||||
"fast"
|
||||
],
|
||||
"title": "lacpRate",
|
||||
"description": "LACPDU frames periodic transmission rate.\n",
|
||||
"markdownDescription": "LACPDU frames periodic transmission rate.",
|
||||
"x-intellij-html-description": "\u003cp\u003eLACPDU frames periodic transmission rate.\u003c/p\u003e\n"
|
||||
},
|
||||
"failOverMac": {
|
||||
"enum": [
|
||||
"none",
|
||||
"active",
|
||||
"follow"
|
||||
],
|
||||
"title": "failOverMac",
|
||||
"description": "Specifies whether active-backup mode should set all slaves to the same MAC address\nat enslavement, when enabled, or perform special handling.\n",
|
||||
"markdownDescription": "Specifies whether active-backup mode should set all slaves to the same MAC address\nat enslavement, when enabled, or perform special handling.",
|
||||
"x-intellij-html-description": "\u003cp\u003eSpecifies whether active-backup mode should set all slaves to the same MAC address\nat enslavement, when enabled, or perform special handling.\u003c/p\u003e\n"
|
||||
},
|
||||
"adSelect": {
|
||||
"enum": [
|
||||
"stable",
|
||||
"bandwidth",
|
||||
"count"
|
||||
],
|
||||
"title": "adSelect",
|
||||
"description": "Aggregate selection policy for 802.3ad.\n",
|
||||
"markdownDescription": "Aggregate selection policy for 802.3ad.",
|
||||
"x-intellij-html-description": "\u003cp\u003eAggregate selection policy for 802.3ad.\u003c/p\u003e\n"
|
||||
},
|
||||
"adActorSysPrio": {
|
||||
"type": "integer",
|
||||
"title": "adActorSysPrio",
|
||||
"description": "Actor system priority for 802.3ad.\n",
|
||||
"markdownDescription": "Actor system priority for 802.3ad.",
|
||||
"x-intellij-html-description": "\u003cp\u003eActor system priority for 802.3ad.\u003c/p\u003e\n"
|
||||
},
|
||||
"adUserPortKey": {
|
||||
"type": "integer",
|
||||
"title": "adUserPortKey",
|
||||
"description": "User port key (upper 10 bits) for 802.3ad.\n",
|
||||
"markdownDescription": "User port key (upper 10 bits) for 802.3ad.",
|
||||
"x-intellij-html-description": "\u003cp\u003eUser port key (upper 10 bits) for 802.3ad.\u003c/p\u003e\n"
|
||||
},
|
||||
"adLACPActive": {
|
||||
"enum": [
|
||||
"on",
|
||||
"off"
|
||||
],
|
||||
"title": "adLACPActive",
|
||||
"description": "Whether to send LACPDU frames periodically.\n",
|
||||
"markdownDescription": "Whether to send LACPDU frames periodically.",
|
||||
"x-intellij-html-description": "\u003cp\u003eWhether to send LACPDU frames periodically.\u003c/p\u003e\n"
|
||||
},
|
||||
"primaryReselect": {
|
||||
"enum": [
|
||||
"always",
|
||||
"better",
|
||||
"failure"
|
||||
],
|
||||
"title": "primaryReselect",
|
||||
"description": "Policy under which the primary slave should be reselected.\n",
|
||||
"markdownDescription": "Policy under which the primary slave should be reselected.",
|
||||
"x-intellij-html-description": "\u003cp\u003ePolicy under which the primary slave should be reselected.\u003c/p\u003e\n"
|
||||
},
|
||||
"resendIGMP": {
|
||||
"type": "integer",
|
||||
"title": "resendIGMP",
|
||||
"description": "The number of times IGMP packets should be resent.\n",
|
||||
"markdownDescription": "The number of times IGMP packets should be resent.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of times IGMP packets should be resent.\u003c/p\u003e\n"
|
||||
},
|
||||
"minLinks": {
|
||||
"type": "integer",
|
||||
"title": "minLinks",
|
||||
"description": "The minimum number of active links required for the bond to be considered active.\n",
|
||||
"markdownDescription": "The minimum number of active links required for the bond to be considered active.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe minimum number of active links required for the bond to be considered active.\u003c/p\u003e\n"
|
||||
},
|
||||
"lpInterval": {
|
||||
"type": "integer",
|
||||
"title": "lpInterval",
|
||||
"description": "The number of seconds between instances where the bonding driver sends learning packets to each slave’s peer switch.\n",
|
||||
"markdownDescription": "The number of seconds between instances where the bonding driver sends learning packets to each slave's peer switch.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of seconds between instances where the bonding driver sends learning packets to each slave\u0026rsquo;s peer switch.\u003c/p\u003e\n"
|
||||
},
|
||||
"packetsPerSlave": {
|
||||
"type": "integer",
|
||||
"title": "packetsPerSlave",
|
||||
"description": "The number of packets to transmit through a slave before moving to the next one.\n",
|
||||
"markdownDescription": "The number of packets to transmit through a slave before moving to the next one.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of packets to transmit through a slave before moving to the next one.\u003c/p\u003e\n"
|
||||
},
|
||||
"numPeerNotif": {
|
||||
"type": "integer",
|
||||
"title": "numPeerNotif",
|
||||
"description": "The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)\nto be issued after a failover event.\n",
|
||||
"markdownDescription": "The number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)\nto be issued after a failover event.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of peer notifications (gratuitous ARPs and unsolicited IPv6 Neighbor Advertisements)\nto be issued after a failover event.\u003c/p\u003e\n"
|
||||
},
|
||||
"tlbLogicalLb": {
|
||||
"type": "integer",
|
||||
"title": "tlbLogicalLb",
|
||||
"description": "Whether dynamic shuffling of flows is enabled in tlb or alb mode.\n",
|
||||
"markdownDescription": "Whether dynamic shuffling of flows is enabled in tlb or alb mode.",
|
||||
"x-intellij-html-description": "\u003cp\u003eWhether dynamic shuffling of flows is enabled in tlb or alb mode.\u003c/p\u003e\n"
|
||||
},
|
||||
"allSlavesActive": {
|
||||
"type": "integer",
|
||||
"title": "allSlavesActive",
|
||||
"description": "Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).\n",
|
||||
"markdownDescription": "Whether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).",
|
||||
"x-intellij-html-description": "\u003cp\u003eWhether duplicate frames (received on inactive ports) should be dropped (0) or delivered (1).\u003c/p\u003e\n"
|
||||
},
|
||||
"peerNotifDelay": {
|
||||
"type": "integer",
|
||||
"title": "peerNotifDelay",
|
||||
"description": "The delay, in milliseconds, between each peer notification.\n",
|
||||
"markdownDescription": "The delay, in milliseconds, between each peer notification.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe delay, in milliseconds, between each peer notification.\u003c/p\u003e\n"
|
||||
},
|
||||
"missedMax": {
|
||||
"type": "integer",
|
||||
"title": "missedMax",
|
||||
"description": "The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.\n",
|
||||
"markdownDescription": "The number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.",
|
||||
"x-intellij-html-description": "\u003cp\u003eThe number of arpInterval monitor checks that must fail in order for an interface to be marked down by the ARP monitor.\u003c/p\u003e\n"
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean",
|
||||
"title": "up",
|
||||
"description": "Bring the link up or down.\n\nIf not specified, the link will be brought up.\n",
|
||||
"markdownDescription": "Bring the link up or down.\n\nIf not specified, the link will be brought up.",
|
||||
"x-intellij-html-description": "\u003cp\u003eBring the link up or down.\u003c/p\u003e\n\n\u003cp\u003eIf not specified, the link will be brought up.\u003c/p\u003e\n"
|
||||
},
|
||||
"mtu": {
|
||||
"type": "integer",
|
||||
"title": "mtu",
|
||||
"description": "Configure LinkMTU (Maximum Transmission Unit) for the link.\n\nIf not specified, the system default LinkMTU will be used (usually 1500).\n",
|
||||
"markdownDescription": "Configure LinkMTU (Maximum Transmission Unit) for the link.\n\nIf not specified, the system default LinkMTU will be used (usually 1500).",
|
||||
"x-intellij-html-description": "\u003cp\u003eConfigure LinkMTU (Maximum Transmission Unit) for the link.\u003c/p\u003e\n\n\u003cp\u003eIf not specified, the system default LinkMTU will be used (usually 1500).\u003c/p\u003e\n"
|
||||
},
|
||||
"addresses": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/network.AddressConfig"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "addresses",
|
||||
"description": "Configure addresses to be statically assigned to the link.\n",
|
||||
"markdownDescription": "Configure addresses to be statically assigned to the link.",
|
||||
"x-intellij-html-description": "\u003cp\u003eConfigure addresses to be statically assigned to the link.\u003c/p\u003e\n"
|
||||
},
|
||||
"routes": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/network.RouteConfig"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "routes",
|
||||
"description": "Configure routes to be statically created via the link.\n",
|
||||
"markdownDescription": "Configure routes to be statically created via the link.",
|
||||
"x-intellij-html-description": "\u003cp\u003eConfigure routes to be statically created via the link.\u003c/p\u003e\n"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"apiVersion",
|
||||
"bondMode",
|
||||
"kind",
|
||||
"links",
|
||||
"name"
|
||||
],
|
||||
"description": "BondConfig is a config document to create a bond (link aggregation) over a set of links."
|
||||
},
|
||||
"network.CommonLinkConfig": {
|
||||
"properties": {
|
||||
"up": {
|
||||
@ -1810,9 +2141,9 @@
|
||||
"parent": {
|
||||
"type": "string",
|
||||
"title": "parent",
|
||||
"description": "Name of the parent link (interface) on which the VLAN link will be created.\n",
|
||||
"markdownDescription": "Name of the parent link (interface) on which the VLAN link will be created.",
|
||||
"x-intellij-html-description": "\u003cp\u003eName of the parent link (interface) on which the VLAN link will be created.\u003c/p\u003e\n"
|
||||
"description": "Name of the parent link (interface) on which the VLAN link will be created.\nLink aliases can be used here as well.\n",
|
||||
"markdownDescription": "Name of the parent link (interface) on which the VLAN link will be created.\nLink aliases can be used here as well.",
|
||||
"x-intellij-html-description": "\u003cp\u003eName of the parent link (interface) on which the VLAN link will be created.\nLink aliases can be used here as well.\u003c/p\u003e\n"
|
||||
},
|
||||
"up": {
|
||||
"type": "boolean",
|
||||
@ -5059,6 +5390,9 @@
|
||||
{
|
||||
"$ref": "#/$defs/hardware.PCIDriverRebindConfigV1Alpha1"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/network.BondConfigV1Alpha1"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/network.DefaultActionConfigV1Alpha1"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user