networkAttachDefController

package
v0.0.0-...-7d86e41 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNetworkControllerTopologyNotManaged = errors.New("no cluster network controller to manage topology")

Functions

This section is empty.

Types

type BaseNetworkController

type BaseNetworkController interface {
	Start(ctx context.Context) error
	Stop()
}

type NADController

type NADController interface {
	Start() error
	Stop()
	GetActiveNetworkForNamespace(namespace string) (util.NetInfo, error)
}

type NetAttachDefinitionController

type NetAttachDefinitionController struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NetAttachDefinitionController handles namespaced scoped NAD events and manages cluster scoped networks defined in those NADs. NADs are mostly referenced from pods to give them access to the network. Different NADs can define the same network as long as those definitions are actually equal. Unexpected situations are handled on best effort basis but improper NAD administration can lead to undefined behavior if referenced by running pods.

func NewNetAttachDefinitionController

func NewNetAttachDefinitionController(
	name string,
	ncm NetworkControllerManager,
	wf watchFactory,
	recorder record.EventRecorder,
) (*NetAttachDefinitionController, error)

func (*NetAttachDefinitionController) GetActiveNetworkForNamespace

func (nadController *NetAttachDefinitionController) GetActiveNetworkForNamespace(namespace string) (util.NetInfo, error)

func (*NetAttachDefinitionController) Start

func (nadController *NetAttachDefinitionController) Start() error

func (*NetAttachDefinitionController) Stop

func (nadController *NetAttachDefinitionController) Stop()

type NetworkController

type NetworkController interface {
	BaseNetworkController
	util.NetInfo
	// Cleanup cleans up the NetworkController-owned resources, it could be called to clean up network controllers that are deleted when
	// ovn-k8s is down; so it's receiver could be a dummy network controller, it just needs to know its network name.
	Cleanup() error
}

type NetworkControllerManager

type NetworkControllerManager interface {
	NewNetworkController(netInfo util.NetInfo) (NetworkController, error)
	CleanupDeletedNetworks(validNetworks ...util.BasicNetInfo) error
}

NetworkControllerManager manages all network controllers

Jump to

Keyboard shortcuts

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