multus

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultNetworkCNIAnnotation = "v1.multus-cni.io/default-network"

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

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 NetworkStatusesFromPod

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

func NewAnnotationData

func NewAnnotationData(
	namespace string,
	interfaces []v1.Interface,
	network v1.Network,
	podInterfaceName string,
) networkv1.NetworkSelectionElement

func NonDefaultNetworkStatusIndexedByPodIfaceName

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

Types

type NetworkAnnotationPool

type NetworkAnnotationPool struct {
	// contains filtered or unexported fields
}

func (*NetworkAnnotationPool) Add

func (nap *NetworkAnnotationPool) Add(multusNetworkAnnotation networkv1.NetworkSelectionElement)

func (*NetworkAnnotationPool) IsEmpty

func (nap *NetworkAnnotationPool) IsEmpty() bool

func (*NetworkAnnotationPool) ToString

func (nap *NetworkAnnotationPool) ToString() (string, error)

Jump to

Keyboard shortcuts

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