Documentation ¶
Index ¶
- Constants
- type AllocationStatus
- type PoolManager
- func (p *PoolManager) AddMacToWaitingConfig(allocations map[string]string) error
- func (p *PoolManager) AllocatePodMac(pod *corev1.Pod) error
- func (p *PoolManager) AllocateVirtualMachineMac(virtualMachine *kubevirt.VirtualMachine) error
- func (p *PoolManager) InitMaps() error
- func (p *PoolManager) IsKubevirtEnabled() bool
- func (p *PoolManager) MarkVMAsReady(vm *kubevirt.VirtualMachine) error
- func (p *PoolManager) ReleasePodMac(podName string) error
- func (p *PoolManager) ReleaseVirtualMachineMac(vm *kubevirt.VirtualMachine) error
- func (p *PoolManager) UpdateMacAddressesForVirtualMachine(previousVirtualMachine, virtualMachine *kubevirt.VirtualMachine) error
Constants ¶
View Source
const ( RangeStartEnv = "RANGE_START" RangeEndEnv = "RANGE_END" RuntimeObjectFinalizerName = "k8s.v1.cni.cncf.io/kubeMacPool" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocationStatus ¶
type AllocationStatus string
const ( AllocationStatusAllocated AllocationStatus = "Allocated" AllocationStatusWaitingForPod AllocationStatus = "WaitingForPod" )
type PoolManager ¶
type PoolManager struct {
// contains filtered or unexported fields
}
func NewPoolManager ¶
func NewPoolManager(kubeClient kubernetes.Interface, rangeStart, rangeEnd net.HardwareAddr, managerNamespace string, kubevirtExist bool, waitTime int) (*PoolManager, error)
func (*PoolManager) AddMacToWaitingConfig ¶
func (p *PoolManager) AddMacToWaitingConfig(allocations map[string]string) error
Add all the allocated mac addresses to the waiting config map with the current time.
func (*PoolManager) AllocatePodMac ¶
func (p *PoolManager) AllocatePodMac(pod *corev1.Pod) error
func (*PoolManager) AllocateVirtualMachineMac ¶
func (p *PoolManager) AllocateVirtualMachineMac(virtualMachine *kubevirt.VirtualMachine) error
func (*PoolManager) InitMaps ¶
func (p *PoolManager) InitMaps() error
func (*PoolManager) IsKubevirtEnabled ¶
func (p *PoolManager) IsKubevirtEnabled() bool
func (*PoolManager) MarkVMAsReady ¶
func (p *PoolManager) MarkVMAsReady(vm *kubevirt.VirtualMachine) error
Remove all the mac addresses from the waiting configmap this mean the vm was saved in the etcd and pass validations
func (*PoolManager) ReleasePodMac ¶
func (p *PoolManager) ReleasePodMac(podName string) error
func (*PoolManager) ReleaseVirtualMachineMac ¶
func (p *PoolManager) ReleaseVirtualMachineMac(vm *kubevirt.VirtualMachine) error
func (*PoolManager) UpdateMacAddressesForVirtualMachine ¶
func (p *PoolManager) UpdateMacAddressesForVirtualMachine(previousVirtualMachine, virtualMachine *kubevirt.VirtualMachine) error
Click to show internal directories.
Click to hide internal directories.