Documentation
¶
Index ¶
- Constants
- func CleanupHosts(overlays []WorkerOverlayIPs, pfIfaces []string)
- func CreateDHCPNetworkAttachmentDefinition(ctx context.Context, testClient client.Client, ...)
- func CreateTestNamespace(ctx context.Context, testClient client.Client, namespace string, ...)
- func DeployDHCPDaemon(ctx context.Context, testClient client.Client, ds *appsv1.DaemonSet, ...) *appsv1.DaemonSet
- func GetPodIPAddressFromNetworkStatus(ctx context.Context, testClient client.Client, namespace, podName string, ...) string
- func GetPodsMatchingLabels(ctx context.Context, testclient client.Client, namespace string, ...) []corev1.Pod
- func SetLinkMacAddress(hostIP net.IP, interfaceName, macAddress string)
- func UpdateDPUNodeLabelsMerge(ctx context.Context, c client.Client, nodeName string, toSet map[string]string, ...)
- func VerifyAttachmentsDHCPAddresses(links []remotehost.VRFLink, overlays []WorkerOverlayIPs)
- func VerifyAttachmentsDHCPRoutes(links []remotehost.VRFLink, overlays []WorkerOverlayIPs, ...)
- func WaitForDHCPDaemonReady(ctx context.Context, testClient client.Client, ds *appsv1.DaemonSet)
- type UnderlayPrefixBits
- type WorkerOverlayIPs
Constants ¶
const ( DefaultTimeout = 1 * time.Minute LongTimeout = 6 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func CleanupHosts ¶
func CleanupHosts(overlays []WorkerOverlayIPs, pfIfaces []string)
CleanupHosts flushes PF overlays using each host's Subnet and removes containers.
func CreateDHCPNetworkAttachmentDefinition ¶
func CreateDHCPNetworkAttachmentDefinition(ctx context.Context, testClient client.Client, namespace, nadName, hostDevice string, mtu int, labels map[string]string)
CreateDHCPNetworkAttachmentDefinition creates a NAD using the host-device CNI plugin with DHCP IPAM and a tuning plugin for MTU configuration. Works for both VFs and PFs.
func CreateTestNamespace ¶
func DeployDHCPDaemon ¶
func DeployDHCPDaemon(ctx context.Context, testClient client.Client, ds *appsv1.DaemonSet, cleanupLabels map[string]string) *appsv1.DaemonSet
DeployDHCPDaemon creates the host-side CNI DHCP DaemonSet from the given spec (typically from applyVPCOVNConfig / applyVPCOVSConfig). The DHCP daemon creates /run/cni/dhcp.sock on each node, which the DHCP CNI IPAM plugin uses to obtain overlay IPs from the DPU's DHCP agent. cleanupLabels are merged into the DaemonSet and pod template so named-scope cleanup can delete the workload (see cleanup.Tracker.executeCleanup label selector).
func GetPodIPAddressFromNetworkStatus ¶
func GetPodIPAddressFromNetworkStatus(ctx context.Context, testClient client.Client, namespace, podName string, interfaceName string) string
GetPodIPAddressFromNetworkStatus returns the IP address of a pod from the network status with the given interface name.
func GetPodsMatchingLabels ¶
func GetPodsMatchingLabels(ctx context.Context, testclient client.Client, namespace string, matchingLabels map[string]string) []corev1.Pod
GetPodsMatchingLabels gets the pods matching the given labels.
func SetLinkMacAddress ¶
SetLinkMacAddress sets the MAC address on a link via SSH to the host (idempotent).
func UpdateDPUNodeLabelsMerge ¶
func UpdateDPUNodeLabelsMerge(ctx context.Context, c client.Client, nodeName string, toSet map[string]string, toDelete []string)
UpdateDPUNodeLabelsMerge adds/updates labels from toSet and deletes labels in toDelete.
func VerifyAttachmentsDHCPAddresses ¶
func VerifyAttachmentsDHCPAddresses(links []remotehost.VRFLink, overlays []WorkerOverlayIPs)
VerifyAttachmentsDHCPAddresses asserts each host got the expected CIDR per VRF link.
func VerifyAttachmentsDHCPRoutes ¶
func VerifyAttachmentsDHCPRoutes(links []remotehost.VRFLink, overlays []WorkerOverlayIPs, bits UnderlayPrefixBits)
VerifyAttachmentsDHCPRoutes asserts DHCP software-plane and rail prefixes in each VRF table.
Types ¶
type UnderlayPrefixBits ¶
type UnderlayPrefixBits struct {
// Overlay is overlayNetworkPrefixLength.
Overlay int
// SoftwarePlane is softwarePlaneIDBitLength.
SoftwarePlane int
// Rail is railIDBitLength.
Rail int
}
UnderlayPrefixBits is overlay, software-plane, and rail prefix lengths from underlayConfigMapData.
type WorkerOverlayIPs ¶
type WorkerOverlayIPs struct {
// Worker is the remote host.
Worker remotehost.Host
// IPs are expected CIDRs, one per VRF link (e.g. 10.0.0.1/31).
IPs []string
// Subnet is the overlay subnet used for route flush.
Subnet string
// Family is IPv4 or IPv6, zero value is IPv4.
Family remotehost.IPFamily
}
WorkerOverlayIPs are expected overlay addresses and subnet for a host.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package topology describes per-hardware Weave rail layout used by e2e tests.
|
Package topology describes per-hardware Weave rail layout used by e2e tests. |
|
bf3
Package bf3 holds Weave e2e topology for BlueField-3 lab hardware.
|
Package bf3 holds Weave e2e topology for BlueField-3 lab hardware. |
|
bf4
Package bf4 holds Weave e2e topology and lab wiring for BlueField-4.
|
Package bf4 holds Weave e2e topology and lab wiring for BlueField-4. |