multus

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultNetworkCNIAnnotation is used when one wants to instruct Multus to connect the pod's primary interface
	// to a network other than Multus's `clusterNetwork` field under /etc/cni/net.d
	// The value of this annotation should be a NetworkAttachmentDefinition's name
	DefaultNetworkCNIAnnotation = "v1.multus-cni.io/default-network"

	// ResourceNameAnnotation represents a resource name that is associated with the network.
	// It could be found on NetworkAttachmentDefinition objects.
	ResourceNameAnnotation = "k8s.v1.cni.cncf.io/resourceName"
)

Variables

This section is empty.

Functions

func GenerateCNIAnnotation

func GenerateCNIAnnotation(
	namespace string,
	interfaces []v1.Interface,
	networks []v1.Network,
	config *virtconfig.ClusterConfig,
) (string, error)

func GenerateCNIAnnotationFromNameScheme

func GenerateCNIAnnotationFromNameScheme(
	namespace string,
	interfaces []v1.Interface,
	networks []v1.Network,
	networkNameScheme map[string]string,
	config *virtconfig.ClusterConfig,
) (string, error)

func LookupPodPrimaryIfaceName

func LookupPodPrimaryIfaceName(networkStatuses []networkv1.NetworkStatus) string

func NetAttachDefNamespacedName

func NetAttachDefNamespacedName(namespace, fullNetworkName string) types.NamespacedName

func NetworkStatusesByPodIfaceName added in v1.5.0

func NetworkStatusesByPodIfaceName(networkStatuses []networkv1.NetworkStatus) map[string]networkv1.NetworkStatus

NetworkStatusesByPodIfaceName creates a map of NetworkStatus objects by pod interface name.

func NetworkStatusesFromPod

func NetworkStatusesFromPod(pod *k8scorev1.Pod) []networkv1.NetworkStatus

func NetworkToResource added in v1.5.0

func NetworkToResource(virtClient kubecli.KubevirtClient, vmi *v1.VirtualMachineInstance) (map[string]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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