network

package
v1.3.0-rc.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultInterfaceQueueCount = 1
	UnknownInterfaceQueueCount = 0
)

Variables

This section is empty.

Functions

func WithDomainAttachments added in v1.1.1

func WithDomainAttachments(domainAttachments map[string]string) vmNetConfiguratorOption

Types

type ConfigStateCache added in v1.0.0

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

func NewConfigStateCache added in v1.0.0

func NewConfigStateCache(vmiUID string, cacheCreator cacheCreator) ConfigStateCache

func NewConfigStateCacheWithPodIfaceStateData added in v1.0.0

func NewConfigStateCacheWithPodIfaceStateData(vmiUID string, cacheCreator cacheCreator, volatilePodIfaceState map[string]cache.PodIfaceState) ConfigStateCache

func (*ConfigStateCache) Delete added in v1.0.0

func (c *ConfigStateCache) Delete(key string) error

func (*ConfigStateCache) Exists added in v1.0.0

func (c *ConfigStateCache) Exists(key string) (bool, error)

func (*ConfigStateCache) Read added in v1.0.0

func (*ConfigStateCache) Write added in v1.0.0

func (c *ConfigStateCache) Write(key string, state cache.PodIfaceState) error

type NSExecutor added in v0.49.0

type NSExecutor interface {
	Do(func() error) error
}

type NetConf added in v0.49.0

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

func NewNetConf added in v0.49.0

func NewNetConf() *NetConf

func NewNetConfWithCustomFactoryAndConfigState added in v1.0.0

func NewNetConfWithCustomFactoryAndConfigState(nsFactory nsFactory, cacheCreator cacheCreator, state map[string]*netpod.State) *NetConf

func (*NetConf) Setup added in v0.49.0

func (c *NetConf) Setup(vmi *v1.VirtualMachineInstance, networks []v1.Network, launcherPid int, preSetup func() error) error

Setup applies (privilege) network related changes for an existing virt-launcher pod.

func (*NetConf) Teardown added in v0.49.0

func (c *NetConf) Teardown(vmi *v1.VirtualMachineInstance) error

type NetStat added in v0.49.0

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

func NewNetStat added in v0.49.0

func NewNetStat() *NetStat

func NewNetStateWithCustomFactory added in v0.50.0

func NewNetStateWithCustomFactory(cacheCreator cacheCreator) *NetStat

func (*NetStat) CachePodInterfaceVolatileData added in v0.49.0

func (c *NetStat) CachePodInterfaceVolatileData(vmi *v1.VirtualMachineInstance, ifaceName string, data *cache.PodIfaceCacheData)

func (*NetStat) PodInterfaceVolatileDataIsCached added in v0.49.0

func (c *NetStat) PodInterfaceVolatileDataIsCached(vmi *v1.VirtualMachineInstance, ifaceName string) bool

func (*NetStat) Teardown added in v0.49.0

func (c *NetStat) Teardown(vmi *v1.VirtualMachineInstance)

func (*NetStat) UpdateStatus added in v0.49.0

func (c *NetStat) UpdateStatus(vmi *v1.VirtualMachineInstance, domain *api.Domain) error

UpdateStatus calculates the vmi.Status.Interfaces based on the following data sets:

  • Pod interface cache: interfaces data (IP/s) collected from the cache (which was populated during the network setup).
  • domain.Spec: interfaces configuration as seen by the (libvirt) domain.
  • domain.Status.Interfaces: interfaces reported by the guest agent (empty if Qemu agent not running).
  • Multus status: Interfaces reported by multus on the pod annotation. The virt-controller updates the VMI interfaces status my setting the infoSource field.

Podnet nic has to be the first one in vmi.Status.Interfaces list to match vmi crd wide columns definition

type VMNetworkConfigurator

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

func NewVMNetworkConfigurator

func NewVMNetworkConfigurator(vmi *v1.VirtualMachineInstance, cacheCreator cacheCreator, opts ...vmNetConfiguratorOption) *VMNetworkConfigurator

func (*VMNetworkConfigurator) SetupPodNetworkPhase2

func (n *VMNetworkConfigurator) SetupPodNetworkPhase2(domain *api.Domain, networks []v1.Network) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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