Documentation
¶
Index ¶
- Constants
- func IndexVMIByMAC(obj client.Object) []string
- func NormalizeMacAddress(macAddress string) (string, error)
- func SetupWithManager(mgr manager.Manager, poolManager *pool_manager.PoolManager) error
- func StripVMIForCollisionDetection(obj interface{}) (interface{}, error)
- type PoolManagerInterface
- type VMICollisionReconciler
Constants ¶
const (
// MacAddressIndexName is the index name for MAC address lookups
MacAddressIndexName = "status.interfaces.mac"
)
Variables ¶
This section is empty.
Functions ¶
func IndexVMIByMAC ¶
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 ¶
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 ¶
VMICollisionReconciler watches VirtualMachineInstance objects and detects MAC address collisions