vmicollision

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MacAddressIndexName is the index name for MAC address lookups
	MacAddressIndexName = "status.interfaces.mac"
)

Variables

This section is empty.

Functions

func IndexVMIByMAC

func IndexVMIByMAC(obj client.Object) []string

IndexVMIByMAC returns all MAC addresses from a VMI's status for indexing. A VMI with multiple interfaces will be indexed under each MAC address. This enables O(1) lookups of all VMIs that have a given MAC address.

func NormalizeMacAddress

func NormalizeMacAddress(macAddress string) (string, error)

NormalizeMacAddress parses and normalizes a MAC address string for comparison. Returns the normalized MAC address string and an error if parsing fails.

func SetupWithManager

func SetupWithManager(mgr manager.Manager, poolManager *pool_manager.PoolManager) error

SetupWithManager sets up the controller with the Manager.

func StripVMIForCollisionDetection

func StripVMIForCollisionDetection(obj interface{}) (interface{}, error)

StripVMIForCollisionDetection keeps only: metadata (minimal), status.interfaces, status.phase, status.migrationState Everything else is stripped to optimize cache memory usage.

Types

type PoolManagerInterface

type PoolManagerInterface interface {
	IsVirtualMachineManaged(namespace string) (bool, error)
	UpdateCollisionsMap(objectRef pool_manager.ObjectReference, collisions map[string][]pool_manager.ObjectReference)
}

PoolManagerInterface defines the methods required by VMICollisionReconciler

type VMICollisionReconciler

type VMICollisionReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

VMICollisionReconciler watches VirtualMachineInstance objects and detects MAC address collisions

func (*VMICollisionReconciler) Reconcile

Reconcile handles VMI reconciliation for collision detection

Jump to

Keyboard shortcuts

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