controller

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdvertisedName = "pod-networks-updates"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerRuntime added in v0.3.4

type ContainerRuntime interface {
	// NetworkNamespace returns the network namespace of the given pod.
	NetworkNamespace(ctx context.Context, podUID string) (string, error)
	// PodSandboxID returns the PodSandboxID of the given pod.
	PodSandboxID(ctx context.Context, podUID string) (string, error)
}

ContainerRuntime interface

type DynamicAttachmentRequest

type DynamicAttachmentRequest struct {
	Pod          *corev1.Pod
	Attachments  []nadv1.NetworkSelectionElement
	Type         DynamicAttachmentRequestType
	PodSandboxID string
	PodNetNS     string
}

func (*DynamicAttachmentRequest) String

func (dar *DynamicAttachmentRequest) String() string

type DynamicAttachmentRequestType

type DynamicAttachmentRequestType string

type PodNetworksController

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

PodNetworksController handles the cncf networks annotations update, and triggers adding / removing networks from a running pod.

func NewPodNetworksController

func NewPodNetworksController(
	k8sCoreInformerFactory v1coreinformerfactory.SharedInformerFactory,
	nadInformers nadinformers.SharedInformerFactory,
	broadcaster record.EventBroadcaster,
	recorder record.EventRecorder,
	k8sClientSet kubernetes.Interface,
	nadClientSet nadclient.Interface,
	containerRuntime ContainerRuntime,
	multusClient multuscni.Client,
) (*PodNetworksController, error)

NewPodNetworksController returns new PodNetworksController instance

func (*PodNetworksController) Eventf

func (pnc *PodNetworksController) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{})

Eventf puts event into kubernetes events

func (*PodNetworksController) Start

func (pnc *PodNetworksController) Start(stopChan <-chan struct{})

Start runs worker thread after performing cache synchronization

Jump to

Keyboard shortcuts

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