libvmi

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultInterfaceName = "default"

Variables

This section is empty.

Functions

func GetPodByVirtualMachineInstance added in v0.36.0

func GetPodByVirtualMachineInstance(vmi *v1.VirtualMachineInstance, namespace string) (*k8sv1.Pod, error)

func IndexInterfaceStatusByName added in v0.36.0

func IndexInterfaceStatusByName(vmi *v1.VirtualMachineInstance) map[string]v1.VirtualMachineInstanceNetworkInterface

func InterfaceDeviceWithBridgeBinding added in v0.34.0

func InterfaceDeviceWithBridgeBinding(name string) kvirtv1.Interface

InterfaceDeviceWithBridgeBinding returns an Interface with bridge binding.

func InterfaceDeviceWithMasqueradeBinding

func InterfaceDeviceWithMasqueradeBinding(ports ...kvirtv1.Port) kvirtv1.Interface

InterfaceDeviceWithMasqueradeBinding returns an Interface named "default" with masquerade binding.

func InterfaceDeviceWithPasstBinding added in v0.56.0

func InterfaceDeviceWithPasstBinding(ports ...kvirtv1.Port) kvirtv1.Interface

InterfaceDeviceWithPasstBinding returns an Interface named "default" with passt binding.

func InterfaceDeviceWithSRIOVBinding added in v0.36.0

func InterfaceDeviceWithSRIOVBinding(name string) kvirtv1.Interface

InterfaceDeviceWithSRIOVBinding returns an Interface with SRIOV binding.

func InterfaceDeviceWithSlirpBinding added in v0.50.0

func InterfaceDeviceWithSlirpBinding(name string, ports ...kvirtv1.Port) kvirtv1.Interface

InterfaceDeviceWithSlirpBinding returns an Interface with SLIRP binding.

func InterfaceWithMac added in v0.36.0

func InterfaceWithMac(iface *kvirtv1.Interface, macAddress string) *kvirtv1.Interface

InterfaceWithMac decorates an existing Interface with a MAC address.

func MultusNetwork added in v0.35.0

func MultusNetwork(name, nadName string) *kvirtv1.Network

MultusNetwork returns a Network with the given name, associated to the given nad

func New

func New(opts ...Option) *v1.VirtualMachineInstance

New instantiates a new VMI configuration, building its properties based on the specified With* options.

func NewAlpine added in v0.50.0

func NewAlpine(opts ...Option) *kvirtv1.VirtualMachineInstance

NewAlpine instantiates a new Alpine based VMI configuration

func NewAlpineWithTestTooling added in v0.53.0

func NewAlpineWithTestTooling(opts ...Option) *kvirtv1.VirtualMachineInstance

func NewCirros added in v0.34.0

func NewCirros(opts ...Option) *kvirtv1.VirtualMachineInstance

NewCirros instantiates a new CirrOS based VMI configuration

func NewFedora

func NewFedora(opts ...Option) *kvirtv1.VirtualMachineInstance

NewFedora instantiates a new Fedora based VMI configuration, building its extra properties based on the specified With* options. This image has tooling for the guest agent, stress, SR-IOV and more.

Types

type Option

type Option func(vmi *v1.VirtualMachineInstance)

Option represents an action that enables an option.

func WithAnnotation added in v0.42.0

func WithAnnotation(key, value string) Option

WithAnnotation adds an annotation with specified value

func WithCDRom added in v0.58.0

func WithCDRom(cdRomName string, bus v1.DiskBus, claimName string) Option

WithCDRom specifies a CDRom drive backed by a PVC to be used.

func WithCPUFeature added in v0.56.0

func WithCPUFeature(featureName, policy string) Option

func WithCPUModel added in v0.56.0

func WithCPUModel(model string) Option

func WithCloudInitConfigDriveData added in v0.55.0

func WithCloudInitConfigDriveData(data string, b64Encoding bool) Option

WithCloudInitConfigDriveData adds cloud-init config-drive user data.

func WithCloudInitNoCloudNetworkData added in v0.35.0

func WithCloudInitNoCloudNetworkData(data string) Option

WithCloudInitNoCloudNetworkData adds cloud-init no-cloud network data.

func WithCloudInitNoCloudUserData

func WithCloudInitNoCloudUserData(data string, b64Encoding bool) Option

WithCloudInitNoCloudUserData adds cloud-init no-cloud user data.

func WithConfigMapDisk added in v1.0.0

func WithConfigMapDisk(configMapName, volumeName string) Option

func WithConfigMapFs added in v1.0.0

func WithConfigMapFs(configMapName, volumeName string) Option

func WithContainerImage

func WithContainerImage(name string) Option

WithContainerImage specifies the name of the container image to be used.

func WithDataVolume added in v0.56.0

func WithDataVolume(diskName, pvcName string) Option

WithDataVolume specifies the name of the DataVolume to be used.

func WithDedicatedCPUPlacement added in v0.56.0

func WithDedicatedCPUPlacement() Option

func WithDownwardAPIDisk added in v1.0.0

func WithDownwardAPIDisk(name string) Option

func WithDownwardAPIFs added in v1.0.0

func WithDownwardAPIFs(name string) Option

func WithEmptyDisk added in v0.57.0

func WithEmptyDisk(diskName string, bus v1.DiskBus, capacity resource.Quantity) Option

WithEmptyDisk specifies the name of the EmptyDisk to be used.

func WithFilesystemDV added in v0.58.0

func WithFilesystemDV(dataVolumeName string) Option

WithFilesystemDV specifies a filesystem backed by a DV to be used.

func WithFilesystemPVC added in v0.58.0

func WithFilesystemPVC(claimName string) Option

WithFilesystemPVC specifies a filesystem backed by a PVC to be used.

func WithGuestMemory added in v0.56.0

func WithGuestMemory(memory string) Option

func WithHugepages added in v0.56.0

func WithHugepages(pageSize string) Option

func WithInterface

func WithInterface(iface kvirtv1.Interface) Option

WithInterface adds a Domain Device Interface.

func WithLabel added in v0.42.0

func WithLabel(key, value string) Option

WithLabel sets a label with specified value

func WithLabelledConfigMapDisk added in v1.0.0

func WithLabelledConfigMapDisk(configMapName, volumeName, label string) Option

func WithLabelledSecretDisk added in v1.0.0

func WithLabelledSecretDisk(secretName, volumeName, label string) Option

func WithLimitCPU added in v0.56.0

func WithLimitCPU(value string) Option

WithLimitCPU specifies the VMI CPU limit.

func WithLimitMemory added in v0.56.0

func WithLimitMemory(value string) Option

WithLimitMemory specifies the VMI memory limit.

func WithMasqueradeNetworking added in v0.53.0

func WithMasqueradeNetworking(ports ...kvirtv1.Port) []Option

func WithNUMAGuestMappingPassthrough added in v0.56.0

func WithNUMAGuestMappingPassthrough() Option

func WithNamespace added in v0.59.0

func WithNamespace(namespace string) Option

func WithNetwork

func WithNetwork(network *kvirtv1.Network) Option

WithNetwork adds a network object.

func WithNodeAffinityFor added in v0.58.1

func WithNodeAffinityFor(node *k8sv1.Node) Option

func WithNodeSelectorFor added in v0.44.2

func WithNodeSelectorFor(node *k8sv1.Node) Option

WithNodeSelectorFor ensures that the VMI gets scheduled on the specified node

func WithPasstInterfaceWithPort added in v0.58.1

func WithPasstInterfaceWithPort() Option

func WithPersistentVolumeClaim added in v0.56.0

func WithPersistentVolumeClaim(diskName, pvcName string) Option

WithPersistentVolumeClaim specifies the name of the PersistentVolumeClaim to be used.

func WithPersistentVolumeClaimLun added in v1.0.0

func WithPersistentVolumeClaimLun(diskName, pvcName string, reservation bool) Option

func WithRealtimeMask added in v0.56.0

func WithRealtimeMask(realtimeMask string) Option

func WithResourceCPU added in v0.56.0

func WithResourceCPU(value string) Option

WithResourceCPU specifies the vmi CPU resource.

func WithResourceMemory

func WithResourceMemory(value string) Option

WithResourceMemory specifies the vmi memory resource.

func WithRng

func WithRng() Option

WithRng adds `rng` to the vmi devices.

func WithSEV added in v0.49.0

func WithSEV() Option

WithSEV adds `launchSecurity` with `sev`.

func WithSecretDisk added in v1.0.0

func WithSecretDisk(secretName, volumeName string) Option

func WithSecretFs added in v1.0.0

func WithSecretFs(secretName, volumeName string) Option

func WithServiceAccountDisk added in v1.0.0

func WithServiceAccountDisk(name string) Option

func WithServiceAccountFs added in v1.0.0

func WithServiceAccountFs(serviceAccountName, volumeName string) Option

func WithTerminationGracePeriod

func WithTerminationGracePeriod(seconds int64) Option

WithTerminationGracePeriod specifies the termination grace period in seconds.

func WithUefi added in v0.49.0

func WithUefi(secureBoot bool) Option

WithUefi configures EFI bootloader and SecureBoot.

Jump to

Keyboard shortcuts

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