mgmt

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateManagementIPs

func AllocateManagementIPs(
	ctx context.Context,
	m *clabtypes.MgmtNet,
	nodes []*clabtypes.NodeConfig,
	options clabtypes.AllocationOptions,
) error

AllocateManagementIPs assigns management addresses after the runtime resolves the network's subnet and gateway.

func EnsureMacvlanHost

func EnsureMacvlanHost(
	ctx context.Context,
	m *clabtypes.MgmtNet,
	host clabutils.MacvlanHost,
	parent netlink.Link,
	networkID string,
	addresses []netip.Addr,
) error

EnsureMacvlanHost configures the host macvlan and its auxiliary addresses.

func MacvlanParentAddresses

func MacvlanParentAddresses(
	links clabutils.MacvlanHostNetlink,
	parent netlink.Link,
) ([]netip.Addr, error)

MacvlanParentAddresses returns globally routable addresses assigned to the parent.

func NewMacvlanHost

func NewMacvlanHost(
	links clabutils.MacvlanHostNetlink,
) clabutils.MacvlanHost

NewMacvlanHost configures host connectivity using the supplied netlink backend. A nil backend uses the host's netlink interface.

func PrepareMacvlanParent

func PrepareMacvlanParent(
	m *clabtypes.MgmtNet,
	links clabutils.MacvlanHostNetlink,
) (netlink.Link, error)

PrepareMacvlanParent looks up the parent and resolves management subnets without modifying host interfaces or routes.

func ResolveAndProbeMacvlanAuxAddresses

func ResolveAndProbeMacvlanAuxAddresses(
	ctx context.Context,
	m *clabtypes.MgmtNet,
	excluded []netip.Addr,
) ([]netip.Addr, error)

ResolveAndProbeMacvlanAuxAddresses selects addresses after checking the parent segment.

func ResolveMacvlanAuxAddresses

func ResolveMacvlanAuxAddresses(
	ctx context.Context,
	m *clabtypes.MgmtNet,
	excluded []netip.Addr,
) ([]netip.Addr, error)

ResolveMacvlanAuxAddresses selects one reserved host address per configured family.

func RestoreMacvlanAuxAddresses

func RestoreMacvlanAuxAddresses(m *clabtypes.MgmtNet, ipv4, ipv6 string) ([]netip.Addr, error)

RestoreMacvlanAuxAddresses validates persisted addresses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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