virtualmachine

package
v0.0.2-pre Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VirtualMachineCreatorNodeDriver = "docker-machine-driver-harvester"
)

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, management *config.Management, options config.Options) error

Types

type VMController

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

func (*VMController) SetOwnerOfPVCs

SetOwnerOfPVCs records the target VirtualMachine as the owner of the PVCs in annotation.

func (*VMController) StoreRunStrategy

StoreRunStrategy stores the last running strategy into the annotation before the VM is stopped. As a workaround for the issue https://github.com/kubevirt/kubevirt/issues/7295

func (*VMController) UnsetOwnerOfPVCs

UnsetOwnerOfPVCs erases the target VirtualMachine from the owner of the PVCs in annotation.

type VMIController

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

func (*VMIController) ReconcileFromHostLabels

ReconcileFromHostLabels handles the propagation of metadata from node labels to VirtualMachineInstance annotations.

func (*VMIController) UnsetOwnerOfPVCs

UnsetOwnerOfPVCs erases the target VirtualMachine from the owner of the PVCs in annotation.

When modifying the VirtualMachine's spec to remove the previously defined PVCs and recreating the VirtualMachineInstance, those previously defined PVCs still hold an OwnerReference of the VirtualMachine, but they are no longer used by the newly created VirtualMachineInstance.

Since the handler of VMController has recorded the relationship in the PVC's annotation, this handler will erase the target owner from the PVC's annotation to avoid logic leak.

type VMNetworkController

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

func (*VMNetworkController) SetDefaultNetworkMacAddress

SetDefaultNetworkMacAddress set the default mac address of networks using the initial allocated mac address from the VMI status, since the most guest OS will use the initial allocated mac address of its DHCP config, and on Kubevirt the VM restart it will re-allocate a new mac address which will lead the original network unreachable.

Jump to

Keyboard shortcuts

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