Documentation ¶
Index ¶
- Constants
- func BuildImageStorageClassName(namespace, name string) string
- func UintPtr(in int) *uint
- type CloudInitSource
- type PersistentVolumeClaimOption
- type VMBuilder
- func (v *VMBuilder) Annotations(annotations map[string]string) *VMBuilder
- func (v *VMBuilder) CPU(cores int) *VMBuilder
- func (v *VMBuilder) CloudInit(diskName string, cloudInitSource CloudInitSource) *VMBuilder
- func (v *VMBuilder) CloudInitDisk(diskName, diskBus string, isCDRom bool, bootOrder int, ...) *VMBuilder
- func (v *VMBuilder) ContainerDisk(diskName, diskBus string, isCDRom bool, bootOrder int, ...) *VMBuilder
- func (v *VMBuilder) ContainerDiskVolume(diskName, imageName, ImagePullPolicy string) *VMBuilder
- func (v *VMBuilder) DefaultPodAntiAffinity() *VMBuilder
- func (v *VMBuilder) Description(description string) *VMBuilder
- func (v *VMBuilder) Disk(diskName, diskBus string, isCDRom bool, bootOrder int) *VMBuilder
- func (v *VMBuilder) EvictionStrategy(liveMigrate bool) *VMBuilder
- func (v *VMBuilder) ExistingPVCVolume(diskName, pvcName string, hotpluggable bool) *VMBuilder
- func (v *VMBuilder) ExistingVolumeDisk(diskName, diskBus string, isCDRom, hotpluggable bool, bootOrder int, ...) *VMBuilder
- func (v *VMBuilder) HostName(hostname string) *VMBuilder
- func (v *VMBuilder) Interface(interfaceName, interfaceModel, interfaceMACAddress string, ...) *VMBuilder
- func (v *VMBuilder) Labels(labels map[string]string) *VMBuilder
- func (v *VMBuilder) MachineType(machineType string) *VMBuilder
- func (v *VMBuilder) Memory(memory string) *VMBuilder
- func (v *VMBuilder) Name(name string) *VMBuilder
- func (v *VMBuilder) Namespace(namespace string) *VMBuilder
- func (v *VMBuilder) Network(interfaceName, networkName string) *VMBuilder
- func (v *VMBuilder) NetworkInterface(...) *VMBuilder
- func (v *VMBuilder) PVCDisk(diskName, diskBus string, isCDRom, hotpluggable bool, bootOrder int, ...) *VMBuilder
- func (v *VMBuilder) PVCVolume(diskName, diskSize, pvcName string, hotpluggable bool, ...) *VMBuilder
- func (v *VMBuilder) PodAntiAffinity(podAffinityTerm corev1.PodAffinityTerm, soft bool, weight int32) *VMBuilder
- func (v *VMBuilder) Run(start bool) *VMBuilder
- func (v *VMBuilder) SSHKey(sshKeyName string) *VMBuilder
- func (v *VMBuilder) Update(vm *kubevirtv1.VirtualMachine) *VMBuilder
- func (v *VMBuilder) VM() (*kubevirtv1.VirtualMachine, error)
- func (v *VMBuilder) Volume(diskName string, volume kubevirtv1.Volume) *VMBuilder
Constants ¶
View Source
const ( CloudInitTypeNoCloud = "noCloud" CloudInitTypeConfigDrive = "configDrive" CloudInitDiskName = "cloudinitdisk" )
View Source
const ( StorageClassNamePrefix = "longhorn" DiskTypeDisk = "disk" DiskTypeCDRom = "cd-rom" DiskBusVirtio = "virtio" DiskBusScsi = "scsi" DiskBusSata = "sata" PersistentVolumeModeBlock = "Block" PersistentVolumeModeFilesystem = "Filesystem" PersistentVolumeAccessModeReadWriteOnce = "ReadWriteOnce" PersistentVolumeAccessModeReadOnlyMany = "ReadOnlyMany" PersistentVolumeAccessModeReadWriteMany = "ReadWriteMany" DefaultDiskSize = "10Gi" DefaultImagePullPolicy = "IfNotPresent" )
View Source
const ( NetworkInterfaceTypeBridge = "bridge" NetworkInterfaceTypeMasquerade = "masquerade" LabelKeyNetworkType = "networks.harvesterhci.io/type" NetworkTypeVLAN = "L2VlanNetwork" NetworkTypeCustom = "Custom" NetworkVLANConfigTemplate = `{"cniVersion":"0.3.1","name":"%s","type":"bridge","bridge":"harvester-br0","promiscMode":true,"vlan":%d,"ipam":{}}` )
View Source
const ( HarvesterAPIGroup = "harvesterhci.io" LabelAnnotationPrefixHarvester = HarvesterAPIGroup + "/" LabelKeyVirtualMachineCreator = LabelAnnotationPrefixHarvester + "creator" LabelKeyVirtualMachineName = LabelAnnotationPrefixHarvester + "vmName" AnnotationKeyVirtualMachineSSHNames = LabelAnnotationPrefixHarvester + "sshNames" AnnotationKeyVirtualMachineDiskNames = LabelAnnotationPrefixHarvester + "diskNames" AnnotationKeyImageID = LabelAnnotationPrefixHarvester + "imageId" AnnotationPrefixCattleField = "field.cattle.io/" LabelPrefixHarvesterTag = "tag.harvesterhci.io/" AnnotationKeyDescription = AnnotationPrefixCattleField + "description" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CloudInitSource ¶
type PersistentVolumeClaimOption ¶
type PersistentVolumeClaimOption struct { ImageID string VolumeMode corev1.PersistentVolumeMode AccessMode corev1.PersistentVolumeAccessMode StorageClassName *string Annotations map[string]string }
type VMBuilder ¶
type VMBuilder struct { VirtualMachine *kubevirtv1.VirtualMachine SSHNames []string InterfaceNames []string }
func NewVMBuilder ¶
func (*VMBuilder) Annotations ¶
func (*VMBuilder) CloudInit ¶
func (v *VMBuilder) CloudInit(diskName string, cloudInitSource CloudInitSource) *VMBuilder
func (*VMBuilder) CloudInitDisk ¶
func (*VMBuilder) ContainerDisk ¶
func (*VMBuilder) ContainerDiskVolume ¶
func (*VMBuilder) DefaultPodAntiAffinity ¶
func (*VMBuilder) Description ¶
func (*VMBuilder) EvictionStrategy ¶
func (*VMBuilder) ExistingPVCVolume ¶
func (*VMBuilder) ExistingVolumeDisk ¶
func (*VMBuilder) MachineType ¶
func (*VMBuilder) NetworkInterface ¶
func (*VMBuilder) PVCVolume ¶
func (v *VMBuilder) PVCVolume(diskName, diskSize, pvcName string, hotpluggable bool, opt *PersistentVolumeClaimOption) *VMBuilder
func (*VMBuilder) PodAntiAffinity ¶
func (*VMBuilder) Update ¶
func (v *VMBuilder) Update(vm *kubevirtv1.VirtualMachine) *VMBuilder
func (*VMBuilder) VM ¶
func (v *VMBuilder) VM() (*kubevirtv1.VirtualMachine, error)
Click to show internal directories.
Click to hide internal directories.