Documentation ¶
Index ¶
- func InterfaceDeviceWithBridgeBinding(name string) kvirtv1.Interface
- func InterfaceDeviceWithMasqueradeBinding(ports ...kvirtv1.Port) kvirtv1.Interface
- func InterfaceDeviceWithSRIOVBinding(name string) kvirtv1.Interface
- func InterfaceDeviceWithSlirpBinding(name string, ports ...kvirtv1.Port) kvirtv1.Interface
- func InterfaceWithBindingPlugin(name string, binding kvirtv1.PluginBinding, ports ...kvirtv1.Port) kvirtv1.Interface
- func InterfaceWithMac(iface *kvirtv1.Interface, macAddress string) *kvirtv1.Interface
- func InterfaceWithMacvtapBindingPlugin(name string) *kvirtv1.Interface
- func InterfaceWithPasstBindingPlugin(ports ...kvirtv1.Port) kvirtv1.Interface
- func MultusNetwork(name, nadName string) *kvirtv1.Network
- func New(opts ...Option) *v1.VirtualMachineInstance
- func NewVirtualMachine(vmi *v1.VirtualMachineInstance, opts ...VMOption) *v1.VirtualMachine
- func RegisterDefaultOption(opt Option)
- type Option
- func WithAnnotation(key, value string) Option
- func WithCDRom(cdRomName string, bus v1.DiskBus, claimName string) Option
- func WithCPUCount(cores, threads, sockets uint32) Option
- func WithCPUFeature(featureName, policy string) Option
- func WithCPUModel(model string) Option
- func WithCloudInitConfigDriveUserData(data string) Option
- func WithCloudInitNoCloudEncodedNetworkData(networkData string) Option
- func WithCloudInitNoCloudEncodedUserData(data string) Option
- func WithCloudInitNoCloudNetworkData(data string) Option
- func WithCloudInitNoCloudNetworkDataSecretName(secretName string) Option
- func WithCloudInitNoCloudUserData(data string) Option
- func WithConfigMapDisk(configMapName, volumeName string) Option
- func WithConfigMapFs(configMapName, volumeName string) Option
- func WithContainerDisk(diskName, imageName string) Option
- func WithDataVolume(diskName, pvcName string) Option
- func WithDedicatedCPUPlacement() Option
- func WithDownwardAPIDisk(name string) Option
- func WithDownwardAPIFs(name string) Option
- func WithDownwardMetricsChannel() Option
- func WithDownwardMetricsVolume(volumeName string) Option
- func WithEmptyDisk(diskName string, bus v1.DiskBus, capacity resource.Quantity) Option
- func WithEphemeralCDRom(cdRomName string, bus v1.DiskBus, claimName string) Option
- func WithEphemeralPersistentVolumeClaim(diskName, pvcName string) Option
- func WithEvictionStrategy(evictionStrategy v1.EvictionStrategy) Option
- func WithFilesystemDV(dataVolumeName string) Option
- func WithFilesystemPVC(claimName string) Option
- func WithGuestMemory(memory string) Option
- func WithHostDisk(diskName, path string, diskType v1.HostDiskType) Option
- func WithHostname(hostname string) Option
- func WithHugepages(pageSize string) Option
- func WithInterface(iface kvirtv1.Interface) Option
- func WithLabel(key, value string) Option
- func WithLabelledConfigMapDisk(configMapName, volumeName, label string) Option
- func WithLabelledSecretDisk(secretName, volumeName, label string) Option
- func WithLimitCPU(value string) Option
- func WithLimitMemory(value string) Option
- func WithNUMAGuestMappingPassthrough() Option
- func WithNamespace(namespace string) Option
- func WithNetwork(network *kvirtv1.Network) Option
- func WithNodeAffinityFor(nodeName string) Option
- func WithNodeAffinityForLabel(nodeLabelKey, nodeLabelValue string) Option
- func WithNodeSelectorFor(node *k8sv1.Node) Option
- func WithPasstInterfaceWithPort() Option
- func WithPersistentVolumeClaim(diskName, pvcName string) Option
- func WithPersistentVolumeClaimLun(diskName, pvcName string, reservation bool) Option
- func WithPreferredNodeAffinity(term k8sv1.PreferredSchedulingTerm) Option
- func WithPreferredPodAffinity(term k8sv1.WeightedPodAffinityTerm) Option
- func WithRealtimeMask(realtimeMask string) Option
- func WithResourceCPU(value string) Option
- func WithResourceMemory(value string) Option
- func WithRng() Option
- func WithSEV(isESEnabled bool) Option
- func WithSEVAttestation() Option
- func WithSecretDisk(secretName, volumeName string) Option
- func WithSecretFs(secretName, volumeName string) Option
- func WithServiceAccountDisk(name string) Option
- func WithServiceAccountFs(serviceAccountName, volumeName string) Option
- func WithStartStrategy(startStrategy v1.StartStrategy) Option
- func WithSubdomain(subdomain string) Option
- func WithTerminationGracePeriod(seconds int64) Option
- func WithUefi(secureBoot bool) Option
- func WithWatchdog(action v1.WatchdogAction) Option
- func WithoutSerialConsole() Option
- type VMOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceDeviceWithBridgeBinding ¶
InterfaceDeviceWithBridgeBinding returns an Interface with bridge binding.
func InterfaceDeviceWithMasqueradeBinding ¶
InterfaceDeviceWithMasqueradeBinding returns an Interface named "default" with masquerade binding.
func InterfaceDeviceWithSRIOVBinding ¶
InterfaceDeviceWithSRIOVBinding returns an Interface with SRIOV binding.
func InterfaceDeviceWithSlirpBinding ¶
InterfaceDeviceWithSlirpBinding returns an Interface with SLIRP binding.
func InterfaceWithMac ¶
InterfaceWithMac decorates an existing Interface with a MAC address.
func InterfaceWithMacvtapBindingPlugin ¶
InterfaceWithMacvtapBindingPlugin returns an Interface named "default" with "macvtap" binding plugin.
func InterfaceWithPasstBindingPlugin ¶
InterfaceWithPasstBinding returns an Interface named "default" with passt binding plugin.
func MultusNetwork ¶
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 NewVirtualMachine ¶
func NewVirtualMachine(vmi *v1.VirtualMachineInstance, opts ...VMOption) *v1.VirtualMachine
func RegisterDefaultOption ¶
func RegisterDefaultOption(opt Option)
Types ¶
type Option ¶
type Option func(vmi *v1.VirtualMachineInstance)
Option represents an action that enables an option.
func WithAnnotation ¶
WithAnnotation adds an annotation with specified value
func WithCPUCount ¶
func WithCPUFeature ¶
func WithCPUModel ¶
func WithCloudInitConfigDriveUserData ¶
WithCloudInitConfigDriveUserData adds cloud-init config-drive user data.
func WithCloudInitNoCloudEncodedNetworkData ¶
WithCloudInitNoCloudEncodedNetworkData adds cloud-init no-cloud base64 encoded network data.
func WithCloudInitNoCloudEncodedUserData ¶
WithCloudInitNoCloudEncodedUserData adds cloud-init no-cloud base64-encoded user data
func WithCloudInitNoCloudNetworkData ¶
WithCloudInitNoCloudNetworkData adds cloud-init no-cloud network data.
func WithCloudInitNoCloudNetworkDataSecretName ¶
WithCloudInitNoCloudNetworkDataSecretName adds cloud-init no-cloud network data from secret.
func WithCloudInitNoCloudUserData ¶
WithCloudInitNoCloudUserData adds cloud-init no-cloud user data.
func WithConfigMapDisk ¶
func WithConfigMapFs ¶
func WithContainerDisk ¶
WithContainerDisk specifies the disk name and the name of the container image to be used.
func WithDataVolume ¶
WithDataVolume specifies the name of the DataVolume to be used.
func WithDedicatedCPUPlacement ¶
func WithDedicatedCPUPlacement() Option
func WithDownwardAPIDisk ¶
func WithDownwardAPIFs ¶
func WithDownwardMetricsChannel ¶
func WithDownwardMetricsChannel() Option
func WithEmptyDisk ¶
WithEmptyDisk specifies the name of the EmptyDisk to be used.
func WithEphemeralCDRom ¶
WithEphemeralCDRom specifies a CDRom drive to be used.
func WithEphemeralPersistentVolumeClaim ¶
WithEphemeralPersistentVolumeClaim specifies the name of the Ephemeral.PersistentVolumeClaim to be used.
func WithEvictionStrategy ¶
func WithEvictionStrategy(evictionStrategy v1.EvictionStrategy) Option
func WithFilesystemDV ¶
WithFilesystemDV specifies a filesystem backed by a DV to be used.
func WithFilesystemPVC ¶
WithFilesystemPVC specifies a filesystem backed by a PVC to be used.
func WithGuestMemory ¶
func WithHostDisk ¶
func WithHostDisk(diskName, path string, diskType v1.HostDiskType) Option
func WithHostname ¶
WithHostname sets the hostname parameter.
func WithHugepages ¶
func WithInterface ¶
WithInterface adds a Domain Device Interface.
func WithLabelledSecretDisk ¶
func WithLimitCPU ¶
WithLimitCPU specifies the VMI CPU limit.
func WithLimitMemory ¶
WithLimitMemory specifies the VMI memory limit.
func WithNUMAGuestMappingPassthrough ¶
func WithNUMAGuestMappingPassthrough() Option
func WithNamespace ¶
func WithNetwork ¶
WithNetwork adds a network object.
func WithNodeAffinityFor ¶
func WithNodeSelectorFor ¶
WithNodeSelectorFor ensures that the VMI gets scheduled on the specified node
func WithPasstInterfaceWithPort ¶
func WithPasstInterfaceWithPort() Option
func WithPersistentVolumeClaim ¶
WithPersistentVolumeClaim specifies the name of the PersistentVolumeClaim to be used.
func WithPreferredNodeAffinity ¶
func WithPreferredNodeAffinity(term k8sv1.PreferredSchedulingTerm) Option
func WithPreferredPodAffinity ¶
func WithPreferredPodAffinity(term k8sv1.WeightedPodAffinityTerm) Option
func WithRealtimeMask ¶
func WithResourceCPU ¶
WithResourceCPU specifies the vmi CPU resource.
func WithResourceMemory ¶
WithResourceMemory specifies the vmi memory resource.
func WithSEVAttestation ¶
func WithSEVAttestation() Option
func WithSecretDisk ¶
func WithSecretFs ¶
func WithServiceAccountDisk ¶
func WithServiceAccountFs ¶
func WithStartStrategy ¶
func WithStartStrategy(startStrategy v1.StartStrategy) Option
func WithSubdomain ¶
WithSubdomain sets the subdomain parameter.
func WithTerminationGracePeriod ¶
WithTerminationGracePeriod specifies the termination grace period in seconds.
func WithWatchdog ¶
func WithWatchdog(action v1.WatchdogAction) Option
WithWatchdog adds a watchdog to the vmi devices.
func WithoutSerialConsole ¶
func WithoutSerialConsole() Option
type VMOption ¶
type VMOption func(vm *v1.VirtualMachine)
func WithDataVolumeTemplate ¶
func WithDataVolumeTemplate(datavolume *v1beta1.DataVolume) VMOption
func WithRunning ¶
func WithRunning() VMOption