Documentation
¶
Overview ¶
Package v1alpha2 is the v1alpha2 version of the API. +groupName=virtualization.deckhouse.io
+kubebuilder:object:generate=true +groupName=virtualization.deckhouse.io
+kubebuilder:object:generate=true +groupName=virtualization.deckhouse.io
Index ¶
- Constants
- Variables
- func GroupVersionResource(resource string) schema.GroupVersionResource
- func Kind(kind string) schema.GroupKind
- func NewAffinityFromVMAffinity(vmAffinity *VMAffinity) *corev1.Affinity
- func Resource(resource string) schema.GroupResource
- type AttachedVirtualMachine
- type BlockDeviceAttachmentPhase
- type BlockDeviceKind
- type BlockDeviceSpecRef
- type BlockDeviceStatusRef
- type BootloaderType
- type CPU
- type CPURecommendedResourcesStatus
- type CPUSpec
- type CPUStatus
- type CPUType
- type Checksum
- type ClusterVirtualImage
- type ClusterVirtualImageContainerImage
- type ClusterVirtualImageDataSource
- type ClusterVirtualImageList
- type ClusterVirtualImageObjectRef
- type ClusterVirtualImageObjectRefKind
- type ClusterVirtualImageSpec
- type ClusterVirtualImageStatus
- type ClusterVirtualImageStatusTarget
- type CoreFractionValue
- type CpuDiscovery
- type CpuFeatures
- type DataSourceHTTP
- type DataSourceType
- type DataSourceUpload
- type DiskPhase
- type DiskTarget
- type Disruptions
- type GPUDeviceSpec
- type ImagePhase
- type ImagePullSecret
- type ImagePullSecretName
- type ImageStatusSize
- type ImageUploadURLs
- type KeepIPAddress
- type LiveMigrationPolicy
- type MachinePhase
- type MemoryMinMax
- type MemorySpec
- type MemoryStatus
- type MigrationResult
- type NameReplacement
- type NameReplacementFrom
- type NetworksSpec
- type NetworksStatus
- type NodeSelector
- type NodeUSBDevice
- type NodeUSBDeviceAttributes
- type NodeUSBDeviceList
- type NodeUSBDeviceSpec
- type NodeUSBDeviceStatus
- type OsType
- type Provisioning
- type ProvisioningType
- type RecommendedResourcesStatus
- type ResourceRef
- type ResourcesStatus
- type RestartApprovalMode
- type RunPolicy
- type ScaleDownPolicy
- type SizingPolicy
- type SizingPolicyCores
- type SizingPolicyMemory
- type SizingPolicyMemoryPerCore
- type SnapshotOperationMode
- type SnapshotResourceStatus
- type SnapshotResourceStatusPhase
- type StatusSpeed
- type StorageType
- type SysprepRef
- type SysprepRefKind
- type Topology
- type USBAddress
- type USBDevice
- type USBDeviceList
- type USBDeviceSpecRef
- type USBDeviceStatus
- type USBDeviceStatusRef
- type UserDataRef
- type UserDataRefKind
- type VMAffinity
- type VMBDAObjectRef
- type VMBDAObjectRefKind
- type VMOPPhase
- type VMOPType
- type VMSOPCreateVirtualMachineCustomization
- type VMSOPCreateVirtualMachineSpec
- type VMSOPPhase
- type VMSOPType
- type Versions
- type VirtualDisk
- type VirtualDiskContainerImage
- type VirtualDiskDataSource
- type VirtualDiskList
- type VirtualDiskMigrationResult
- type VirtualDiskMigrationState
- type VirtualDiskObjectRef
- type VirtualDiskObjectRefKind
- type VirtualDiskPersistentVolumeClaim
- type VirtualDiskReclaim
- type VirtualDiskReclaimPolicy
- type VirtualDiskSnapshot
- type VirtualDiskSnapshotList
- type VirtualDiskSnapshotPhase
- type VirtualDiskSnapshotSpec
- type VirtualDiskSnapshotStatus
- type VirtualDiskSpec
- type VirtualDiskStats
- type VirtualDiskStatsCreationDuration
- type VirtualDiskStatus
- type VirtualDiskTemplateSpec
- type VirtualImage
- type VirtualImageContainerImage
- type VirtualImageDataSource
- type VirtualImageList
- type VirtualImageObjectRef
- type VirtualImageObjectRefKind
- type VirtualImagePersistentVolumeClaim
- type VirtualImageSpec
- type VirtualImageStatus
- type VirtualImageStatusTarget
- type VirtualMachine
- type VirtualMachineAndPodAffinity
- type VirtualMachineAndPodAffinityTerm
- type VirtualMachineAndPodAntiAffinity
- type VirtualMachineBlockDeviceAttachment
- type VirtualMachineBlockDeviceAttachmentList
- type VirtualMachineBlockDeviceAttachmentSpec
- type VirtualMachineBlockDeviceAttachmentStatus
- type VirtualMachineClass
- type VirtualMachineClassList
- type VirtualMachineClassPhase
- type VirtualMachineClassSpec
- type VirtualMachineClassStatus
- type VirtualMachineIPAddress
- type VirtualMachineIPAddressLease
- type VirtualMachineIPAddressLeaseIpAddressRef
- type VirtualMachineIPAddressLeaseList
- type VirtualMachineIPAddressLeasePhase
- type VirtualMachineIPAddressLeaseSpec
- type VirtualMachineIPAddressLeaseStatus
- type VirtualMachineIPAddressList
- type VirtualMachineIPAddressPhase
- type VirtualMachineIPAddressSpec
- type VirtualMachineIPAddressStatus
- type VirtualMachineIPAddressType
- type VirtualMachineLaunchTimeDuration
- type VirtualMachineList
- type VirtualMachineLocation
- type VirtualMachineMACAddress
- type VirtualMachineMACAddressLease
- type VirtualMachineMACAddressLeaseList
- type VirtualMachineMACAddressLeaseMACAddressRef
- type VirtualMachineMACAddressLeasePhase
- type VirtualMachineMACAddressLeaseSpec
- type VirtualMachineMACAddressLeaseStatus
- type VirtualMachineMACAddressList
- type VirtualMachineMACAddressPhase
- type VirtualMachineMACAddressSpec
- type VirtualMachineMACAddressStatus
- type VirtualMachineMigrationState
- type VirtualMachineOperation
- type VirtualMachineOperationCloneCustomization
- type VirtualMachineOperationCloneSpec
- type VirtualMachineOperationList
- type VirtualMachineOperationMigrateSpec
- type VirtualMachineOperationRestoreSpec
- type VirtualMachineOperationSpec
- type VirtualMachineOperationStatus
- type VirtualMachinePhaseTransitionTimestamp
- type VirtualMachinePod
- type VirtualMachinePool
- type VirtualMachinePoolList
- type VirtualMachinePoolSpec
- type VirtualMachinePoolStatus
- type VirtualMachineSnapshot
- type VirtualMachineSnapshotList
- type VirtualMachineSnapshotOperation
- type VirtualMachineSnapshotOperationList
- type VirtualMachineSnapshotOperationSpec
- type VirtualMachineSnapshotOperationStatus
- type VirtualMachineSnapshotPhase
- type VirtualMachineSnapshotSpec
- type VirtualMachineSnapshotStatus
- type VirtualMachineSpec
- type VirtualMachineStats
- type VirtualMachineStatus
- type VirtualMachineTemplateMetadata
- type VirtualMachineTemplateSpec
- type WeightedVirtualMachineAndPodAffinityTerm
Constants ¶
const ( ClusterVirtualImageKind = "ClusterVirtualImage" ClusterVirtualImageResource = "clustervirtualimages" )
const ( // ReasonVDAlreadyInUse is event reason that VirtualDisk was not attached to VirtualMachine, because VirtualDisk attached to another VirtualMachine. ReasonVDAlreadyInUse = "VirtualDiskAlreadyInUse" // ReasonVMChangesApplied is event reason that changes applied from VM to underlying KVVM. ReasonVMChangesApplied = "ChangesApplied" // ReasonVMStarted is event reason that VM is about to start. ReasonVMStarted = "Started" // ReasonVMStopped is event reason that VM is about to stop. ReasonVMStopped = "Stopped" // ReasonVMRestarted is event reason that VM is about to restart. ReasonVMRestarted = "Restarted" // ReasonVMEvicted is event reason that VM is about to evict. ReasonVMEvicted = "Evicted" // ReasonVMMigrated is event reason that VM is about to migrate. ReasonVMMigrated = "Migrated" // ReasonVMStartFailed is an event reason indicating that the start of the VM failed. ReasonVMStartFailed = "Failed" // ReasonVMStopFailed is an event reason indicating that the stop of the VM failed. ReasonVMStopFailed = "Failed" // ReasonVMLastAppliedSpecIsInvalid is event reason that JSON in last-applied-spec annotation is invalid. ReasonVMLastAppliedSpecIsInvalid = "LastAppliedSpecIsInvalid" // ReasonVMClassLastAppliedSpecInvalid is event reason that JSON in last-applied-spec annotation is invalid. ReasonVMClassLastAppliedSpecInvalid = "VMClassLastAppliedSpecInvalid" // ReasonErrVmNotSynced is event reason that vm is not synced. ReasonErrVmNotSynced = "VirtualMachineNotSynced" // ReasonErrVmSynced is event reason that vm is synced. ReasonErrVmSynced = "VirtualMachineSynced" // ReasonErrRestartAwaitingChanges is event reason indicating that the vm has pending changes requiring a restart. ReasonErrRestartAwaitingChanges = "RestartAwaitingChanges" // ReasonVMCPUResizing is event reason that the vm cpu is resizing. ReasonVMCPUResizing = "CPUResizing" // ReasonVMMemoryResizing is event reason that the vm memory is resizing. ReasonVMMemoryResizing = "MemoryResizing" // ReasonVMCPUAndMemoryResizing is event reason that the vm cpu and memory are resizing. ReasonVMCPUAndMemoryResizing = "CPUAndMemoryResizing" // ReasonWorkloadUpdateFailed is event reason that an automatic workload-update migration failed and will not be retried. ReasonWorkloadUpdateFailed = "WorkloadUpdateFailed" // ReasonErrVMOPFailed is event reason that operation is failed ReasonErrVMOPFailed = "VirtualMachineOperationFailed" // ReasonErrVMOPPending is event reason that operation is pending ReasonErrVMOPPending = "VirtualMachineOperationPending" // ReasonVMOPSucceeded is event reason that the operation is successfully completed ReasonVMOPSucceeded = "VirtualMachineOperationSucceeded" // ReasonVMOPStarted is event reason that the operation is started ReasonVMOPStarted = "VirtualMachineOperationStarted" // ReasonVMOPInProgress is event reason that the operation is in progress ReasonVMOPInProgress = "VirtualMachineOperationInProgress" // ReasonVMSOPStarted is event reason that the operation is started ReasonVMSOPStarted = "VirtualMachineSnaphotOperationStarted" // ReasonErrVMSOPFailed is event reason that operation is failed ReasonErrVMSOPFailed = "VirtualMachineSnapshotOperationFailed" // ReasonVMSOPSucceeded is event reason that the operation is successfully completed ReasonVMSOPSucceeded = "VirtualMachineSnapshotOperationSucceeded" // ReasonVMSOPInProgress is event reason that the operation is in progress ReasonVMSOPInProgress = "VirtualMachineSnapshotOperationInProgress" // ReasonVDSpecHasBeenChanged is event reason that spec of virtual disk has been changed. ReasonVDSpecHasBeenChanged = "VirtualDiskSpecHasBeenChanged" // ReasonVISpecHasBeenChanged is event reason that spec of virtual image has been changed. ReasonVISpecHasBeenChanged = "VirtualImageSpecHasBeenChanged" // ReasonVIImageLostRecovered is event reason that a lost virtual image reappeared in DVCR and was restored to Ready. ReasonVIImageLostRecovered = "VirtualImageLostRecovered" // ReasonCVIImageLostRecovered is event reason that a lost cluster virtual image reappeared in DVCR and was restored to Ready. ReasonCVIImageLostRecovered = "ClusterVirtualImageLostRecovered" // ReasonVDContainerRegistrySecretNotFound is event reason that VDContainerRegistrySecret not found. ReasonVDContainerRegistrySecretNotFound = "VirtualDiskContainerRegistrySecretNotFound" // ReasonVDResizingStarted is event reason that VD Resizing is started. ReasonVDResizingStarted = "VirtualDiskResizingStarted" // ReasonVDResizingCompleted is event reason that VD Resizing is completed. ReasonVDResizingCompleted = "VirtualDiskResizingCompleted" // ReasonVDResizingFailed is event reason that VD Resizing is failed. ReasonVDResizingFailed = "VirtualDiskResizingFailed" // ReasonVDResizingNotAvailable is event reason that VD Resizing is not available. ReasonVDResizingNotAvailable = "VirtualDiskResizingNotAvailable" // ReasonVIStorageClassNotFound is event reason that VIStorageClass not found. ReasonVIStorageClassNotFound = "VirtualImageStorageClassNotFound" // ReasonDataSourceSyncStarted is event reason that DataSource sync is started. ReasonDataSourceSyncStarted = "DataSourceImportStarted" // ReasonDataSourceSyncInProgress is event reason that DataSource sync is in progress. ReasonDataSourceSyncInProgress = "DataSourceImportInProgress" // ReasonDataSourceSyncCompleted is event reason that DataSource sync is completed. ReasonDataSourceSyncCompleted = "DataSourceImportCompleted" // ReasonDataSourceSyncFailed is event reason that DataSource sync is failed. ReasonDataSourceSyncFailed = "DataSourceImportFailed" // ReasonDataSourceQuotaExceeded is event reason that DataSource sync is failed because quota exceed. ReasonDataSourceQuotaExceeded = "DataSourceQuotaExceed" // ReasonImageOperationPostponedDueToDVCRGarbageCollection is event reason that operation is postponed until the end of DVCR garbage collection. ReasonImageOperationPostponedDueToDVCRGarbageCollection = "ImageOperationPostponedDueToDVCRGarbageCollection" // ReasonImageOperationContinueAfterDVCRGarbageCollection is event reason that operation is resumed after DVCR garbage collection is finished. ReasonImageOperationContinueAfterDVCRGarbageCollection = "ImageOperationContinueAfterDVCRGarbageCollection" // ReasonDataSourceDiskProvisioningFailed is event reason that DataSource disk provisioning is failed. ReasonDataSourceDiskProvisioningFailed = "DataSourceImportDiskProvisioningFailed" // ReasonVMSnapshottingStarted is event reason that VirtualMachine snapshotting is started. ReasonVMSnapshottingStarted = "VirtualMachineSnapshottingStarted" // ReasonVMSnapshottingFrozen is event reason that the file system of VirtualMachine is frozen. ReasonVMSnapshottingFrozen = "VirtualMachineSnapshottingFrozen" // ReasonVMSnapshottingInProgress is event reason that VirtualMachine snapshotting is in progress. ReasonVMSnapshottingInProgress = "VirtualMachineSnapshottingInProgress" // ReasonVMSnapshottingThawed is event reason that the file system of VirtualMachine is thawed. ReasonVMSnapshottingThawed = "VirtualMachineSnapshottingThawed" // ReasonVMSnapshottingPending is event reason that VirtualMachine is not ready for snapshotting. ReasonVMSnapshottingPending = "VirtualMachineSnapshottingPending" // ReasonVMSnapshottingCompleted is event reason that VirtualMachine snapshotting is completed. ReasonVMSnapshottingCompleted = "VirtualMachineSnapshottingCompleted" // ReasonVMSnapshottingFailed is event reason that VirtualMachine snapshotting is failed. ReasonVMSnapshottingFailed = "VirtualMachineSnapshottingFailed" // ReasonAttached is event reason that VirtualMachineIPAddress is attached to VM. ReasonAttached = "Attached" // ReasonNotAttached is event reason that VirtualMachineIPAddress is not attached to VirtualMachine. ReasonNotAttached = "NotAttached" // ReasonIPAddressHasBeenAllocated is the event reason indicating that a new IP address has been allocated. ReasonIPAddressHasBeenAllocated = "IPAddressHasBeenAllocated" // ReasonBound is the event reason indicating that a VirtualMachineIPLease is bound to a VirtualMachineIPAddress. ReasonBound = "Bound" // ReasonReleased is the event reason indicating that a VirtualMachineIPLease is released. ReasonReleased = "Released" // ReasonFailed is the event reason indicating that the binding of a VirtualMachineIPLease to a VirtualMachineIPAddress has failed. ReasonFailed = "Failed" // ReasonVMClassSizingPoliciesWereChanged is event reason indicating that VMClass sizing policies were changed. ReasonVMClassSizingPoliciesWereChanged = "SizingPoliciesWereChanged" // ReasonVMClassAvailableNodesListEmpty is event reason indicating that VMClass has no available nodes. ReasonVMClassAvailableNodesListEmpty = "AvailableNodesListEmpty" // ReasonVMClassNodesWereUpdated is event reason indicating that VMClass available nodes list was updated. ReasonVMClassNodesWereUpdated = "NodesWereUpdated" // ReasonVolumeMigrationCannotBeProcessed is event reason indicating that volume migration cannot be processed. ReasonVolumeMigrationCannotBeProcessed = "VolumeMigrationCannotBeProcessed" // ReasonDeleted is event reason that Object is deleted. ReasonDeleted = "Deleted" // ReasonVMHotplugMemoryNotSupported is event reason that VMHotplugMemoryNotSupported. ReasonVMHotplugCPUNotSupported = "VMHotplugCPUNotSupported" // ReasonVMHotplugMemoryNotSupported is event reason that VMHotplugMemoryNotSupported. ReasonVMHotplugMemoryNotSupported = "VMHotplugMemoryNotSupported" // ReasonCoreFractionScaling is event reason that the effective coreFraction is being // changed to the value desired by the Vertical VirtualMachine Autoscaler. ReasonCoreFractionScaling = "CoreFractionScaling" )
const ( FinalizerCVIProtection = "virtualization.deckhouse.io/cvi-protection" FinalizerVIProtection = "virtualization.deckhouse.io/vi-protection" FinalizerVDProtection = "virtualization.deckhouse.io/vd-protection" // FinalizerKVVMProtection protects KVVMs from deletion. // // Deprecated: FinalizerKVVMProtection is deprecated and should be deleted in the next versions. FinalizerKVVMProtection = "virtualization.deckhouse.io/kvvm-protection" FinalizerIPAddressProtection = "virtualization.deckhouse.io/vmip-protection" FinalizerPodProtection = "virtualization.deckhouse.io/pod-protection" // FinalizerPVCProtection keeps PVCs backing block device volumes of a // virtual machine while those volumes may be mounted on a node. It is // released only after the KVVM, KVVMI and virt-launcher pods are gone, // so the storage backend cannot destroy data under a live mount. FinalizerPVCProtection = "virtualization.deckhouse.io/pvc-protection" FinalizerVDSnapshotProtection = "virtualization.deckhouse.io/vdsnapshot-protection" FinalizerVMSnapshotProtection = "virtualization.deckhouse.io/vmsnapshot-protection" FinalizerVMOPProtectionByEvacuationController = "virtualization.deckhouse.io/vmop-protection-by-evacuation-controller" FinalizerVMOPProtectionByVMController = "virtualization.deckhouse.io/vmop-protection-by-vm-controller" FinalizerCVICleanup = "virtualization.deckhouse.io/cvi-cleanup" FinalizerVDCleanup = "virtualization.deckhouse.io/vd-cleanup" FinalizerVICleanup = "virtualization.deckhouse.io/vi-cleanup" FinalizerVMCleanup = "virtualization.deckhouse.io/vm-cleanup" FinalizerIPAddressCleanup = "virtualization.deckhouse.io/vmip-cleanup" FinalizerIPAddressLeaseCleanup = "virtualization.deckhouse.io/vmipl-cleanup" FinalizerVDSnapshotCleanup = "virtualization.deckhouse.io/vdsnapshot-cleanup" FinalizerVMOPCleanup = "virtualization.deckhouse.io/vmop-cleanup" FinalizerVMSOPCleanup = "virtualization.deckhouse.io/vmsop-cleanup" FinalizerVMClassCleanup = "virtualization.deckhouse.io/vmclass-cleanup" FinalizerVMBDACleanup = "virtualization.deckhouse.io/vmbda-cleanup" FinalizerMACAddressCleanup = "virtualization.deckhouse.io/vmmac-cleanup" FinalizerMACAddressLeaseCleanup = "virtualization.deckhouse.io/vmmacl-cleanup" FinalizerNodeUSBDeviceCleanup = "virtualization.deckhouse.io/nodeusbdevice-cleanup" FinalizerUSBDeviceCleanup = "virtualization.deckhouse.io/usbdevice-cleanup" )
const ( USBDeviceKind = "USBDevice" USBDeviceResource = "usbdevices" )
const ( VirtualDiskKind = "VirtualDisk" VirtualDiskResource = "virtualdisks" )
const ( VirtualDiskSnapshotKind = "VirtualDiskSnapshot" VirtualDiskSnapshotResource = "virtualdisksnapshots" )
const ( VirtualImageKind = "VirtualImage" VirtualImageResource = "virtualimages" )
const ( VirtualMachineKind = "VirtualMachine" VirtualMachineResource = "virtualmachines" )
const ( NetworksTypeMain = "Main" NetworksTypeNetwork = "Network" NetworksTypeClusterNetwork = "ClusterNetwork" )
const ( SecretTypeCloudInit corev1.SecretType = "provisioning.virtualization.deckhouse.io/cloud-init" SecretTypeSysprep corev1.SecretType = "provisioning.virtualization.deckhouse.io/sysprep" )
const ( VirtualMachineBlockDeviceAttachmentKind = "VirtualMachineBlockDeviceAttachment" VirtualMachineBlockDeviceAttachmentResource = "virtualmachineblockdeviceattachments" )
const ( VirtualMachineClassKind = "VirtualMachineClass" VirtualMachineClassResource = "virtualmachineclasses" )
const ( VirtualMachineIPAddressKind = "VirtualMachineIPAddress" VirtualMachineIPAddressResource = "virtualmachineipaddresses" )
const ( VirtualMachineIPAddressLeaseKind = "VirtualMachineIPAddressLease" VirtualMachineIPAddressLeaseResource = "virtualmachineipaddressleases" )
const ( VirtualMachineMACAddressKind = "VirtualMachineMACAddress" VirtualMachineMACAddressResource = "virtualmachinemacaddresses" )
const ( VirtualMachineMACAddressLeaseKind = "VirtualMachineMACAddressLease" VirtualMachineMACAddressLeaseResource = "virtualmachinemacaddressleases" )
const ( VirtualMachineOperationKind = "VirtualMachineOperation" VirtualmachineOperationResource = "virtualmachineoperations" )
const ( VirtualMachinePoolKind = "VirtualMachinePool" VirtualMachinePoolResource = "virtualmachinepools" )
const ( VirtualMachineSnapshotKind = "VirtualMachineSnapshot" VirtualMachineSnapshotResource = "virtualmachinesnapshots" )
const ( VirtualMachineSnapshotOperationKind = "VirtualMachineSnapshotOperation" VirtualmachineSnapshotOperationResource = "virtualmachinesnapshotoperations" )
const CoreFractionAuto = "Auto"
CoreFractionAuto is the special spec.cpu.coreFraction value that delegates the coreFraction to the Vertical VirtualMachine Autoscaler (EE).
const (
NodeUSBDeviceKind = "NodeUSBDevice"
)
const Version = "v1alpha2"
Variables ¶
var ( // SchemeBuilder tbd SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme tbd AddToScheme = SchemeBuilder.AddToScheme )
var ClusterVirtualImageGVK = schema.GroupVersionKind{Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: ClusterVirtualImageKind}
ClusterVirtualImageGVK is group version kind for ClusterVirtualImage
var SchemeGroupVersion = schema.GroupVersion{Group: core.GroupName, Version: Version}
SchemeGroupVersion is group version used to register these objects
var VirtualDiskGVK = schema.GroupVersionKind{Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: VirtualDiskKind}
VirtualDiskGVK is group version kind for VirtualDisk
var VirtualImageGVK = schema.GroupVersionKind{Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: VirtualImageKind}
VirtualImageGVK is group version kind for VirtualImage
var VirtualMachinePoolGVK = schema.GroupVersionKind{Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: VirtualMachinePoolKind}
VirtualMachinePoolGVK is group version kind for VirtualMachinePool
Functions ¶
func GroupVersionResource ¶
func GroupVersionResource(resource string) schema.GroupVersionResource
func NewAffinityFromVMAffinity ¶
func NewAffinityFromVMAffinity(vmAffinity *VMAffinity) *corev1.Affinity
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AttachedVirtualMachine ¶
type AttachedVirtualMachine struct {
// Name of attached VirtualMachine.
Name string `json:"name,omitempty"`
// Flag indicating that VirtualDisk is currently being used by this attached VirtualMachine.
Mounted bool `json:"mounted,omitempty"`
}
List of VirtualMachines that use the disk.
func (*AttachedVirtualMachine) DeepCopy ¶
func (in *AttachedVirtualMachine) DeepCopy() *AttachedVirtualMachine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttachedVirtualMachine.
func (*AttachedVirtualMachine) DeepCopyInto ¶
func (in *AttachedVirtualMachine) DeepCopyInto(out *AttachedVirtualMachine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockDeviceAttachmentPhase ¶
type BlockDeviceAttachmentPhase string
BlockDeviceAttachmentPhase defines the current status of the resource: * `Pending`: The resource has been created and is on a waiting queue. * `InProgress`: The disk is being attached to the VM. * `Attached`: The disk has been attached to the VM. * `Failed`: There was an error when attaching the disk. * `Terminating`: The resource is being deleted.
+kubebuilder:validation:Enum={Pending,InProgress,Attached,Failed,Terminating}
const ( BlockDeviceAttachmentPhasePending BlockDeviceAttachmentPhase = "Pending" BlockDeviceAttachmentPhaseInProgress BlockDeviceAttachmentPhase = "InProgress" BlockDeviceAttachmentPhaseAttached BlockDeviceAttachmentPhase = "Attached" BlockDeviceAttachmentPhaseFailed BlockDeviceAttachmentPhase = "Failed" BlockDeviceAttachmentPhaseTerminating BlockDeviceAttachmentPhase = "Terminating" )
type BlockDeviceKind ¶
type BlockDeviceKind string
The BlockDeviceKind is a type of the block device. Options are:
* `ClusterVirtualImage` — Use `ClusterVirtualImage` as the disk. This type is always mounted in RO mode. If the image is an iso-image, it will be mounted as a CDROM device. * `VirtualImage` — Use `VirtualImage` as the disk. This type is always mounted in RO mode. If the image is an iso-image, it will be mounted as a CDROM device. * `VirtualDisk` — Use `VirtualDisk` as the disk. This type is always mounted in RW mode. +kubebuilder:validation:Enum:={ClusterVirtualImage,VirtualImage,VirtualDisk}
const ( ClusterImageDevice BlockDeviceKind = "ClusterVirtualImage" ImageDevice BlockDeviceKind = "VirtualImage" DiskDevice BlockDeviceKind = "VirtualDisk" )
type BlockDeviceSpecRef ¶
type BlockDeviceSpecRef struct {
Kind BlockDeviceKind `json:"kind"`
// The name of attached resource.
Name string `json:"name"`
// Boot order of the block device. A smaller value means a higher priority.
// If the parameter is not set for any device, the boot order follows the device position in the list (starting from 1).
// If the parameter is set for at least one device, the boot order is determined by the specified values.
// +optional
// +kubebuilder:validation:Minimum=1
BootOrder *uint `json:"bootOrder,omitempty"`
}
func (*BlockDeviceSpecRef) DeepCopy ¶
func (in *BlockDeviceSpecRef) DeepCopy() *BlockDeviceSpecRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceSpecRef.
func (*BlockDeviceSpecRef) DeepCopyInto ¶
func (in *BlockDeviceSpecRef) DeepCopyInto(out *BlockDeviceSpecRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockDeviceStatusRef ¶
type BlockDeviceStatusRef struct {
Kind BlockDeviceKind `json:"kind"`
// The name of attached resource.
Name string `json:"name"`
// The size of attached block device.
Size string `json:"size"`
// The block device is attached to the virtual machine.
Attached bool `json:"attached"`
// The name of attached block device.
// +kubebuilder:example=sda
Target string `json:"target,omitempty"`
// Block device is attached via hot plug connection.
Hotplugged bool `json:"hotplugged,omitempty"`
// The name of the `VirtualMachineBlockDeviceAttachment` resource that defines hot plug disk connection to the virtual machine.
VirtualMachineBlockDeviceAttachmentName string `json:"virtualMachineBlockDeviceAttachmentName,omitempty"`
// Boot order of the block device. A smaller value means a higher priority.
BootOrder *uint `json:"bootOrder,omitempty"`
}
func (*BlockDeviceStatusRef) DeepCopy ¶
func (in *BlockDeviceStatusRef) DeepCopy() *BlockDeviceStatusRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceStatusRef.
func (*BlockDeviceStatusRef) DeepCopyInto ¶
func (in *BlockDeviceStatusRef) DeepCopyInto(out *BlockDeviceStatusRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BootloaderType ¶
type BootloaderType string
The BootloaderType defines bootloader for VM. * BIOS - use legacy BIOS. * EFI - use Unified Extensible Firmware (EFI/UEFI). * EFIWithSecureBoot - use UEFI/EFI with SecureBoot support. +kubebuilder:validation:Enum={BIOS,EFI,EFIWithSecureBoot}
const ( BIOS BootloaderType = "BIOS" EFI BootloaderType = "EFI" EFIWithSecureBoot BootloaderType = "EFIWithSecureBoot" )
type CPU ¶
type CPU struct {
// +kubebuilder:validation:Required
Type CPUType `json:"type"`
// CPU model name. For more information about CPU models and topology, refer to the [libvirt docs](https://libvirt.org/formatdomain.html#cpu-model-and-topology).
//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:example=IvyBridge
Model string `json:"model,omitempty"`
// List of CPU instructions (features) required when type=Features.
// For more information about CPU features, refer to the [libvirt docs](https://libvirt.org/formatdomain.html#cpu-model-and-topology).
//
// +kubebuilder:validation:MinItems=1
// +kubebuilder:example={mmx, vmx, sse2}
Features []string `json:"features,omitempty"`
// Create a CPU model based on intersecting CPU features for selected nodes.
Discovery *CpuDiscovery `json:"discovery,omitempty"`
}
CPU defines the requirements for the virtual CPU model. +kubebuilder:validation:XValidation:rule="self == oldSelf",message=".spec.cpu is immutable" +kubebuilder:validation:XValidation:rule="self.type == 'HostPassthrough' || self.type == 'Host' ? !has(self.model) && !has(self.features) && !has(self.discovery) : true",message="HostPassthrough and Host cannot have model, features or discovery" +kubebuilder:validation:XValidation:rule="self.type == 'Discovery' ? !has(self.model) && !has(self.features) : true",message="Discovery cannot have model or features" +kubebuilder:validation:XValidation:rule="self.type == 'Model' ? has(self.model) && !has(self.features) && !has(self.discovery) : true",message="Model requires model and cannot have features or discovery" +kubebuilder:validation:XValidation:rule="self.type == 'Features' ? has(self.features) && !has(self.model) && !has(self.discovery): true",message="Features requires features and cannot have model or discovery"
func (*CPU) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPU.
func (*CPU) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CPURecommendedResourcesStatus ¶ added in v1.11.1
type CPURecommendedResourcesStatus struct {
// CoreFraction recommended by the autoscaler when `spec.cpu.coreFraction` is `Auto`.
// The virtual machine controller applies it and publishes the applied value in
// `status.resources.cpu.coreFraction`. Empty when autoscaling is off.
// +kubebuilder:validation:Pattern=`^(100|[1-9][0-9]?)%$`
CoreFraction string `json:"coreFraction,omitempty"`
}
CPURecommendedResourcesStatus defines the CPU values recommended by the Vertical VirtualMachine Autoscaler.
func (*CPURecommendedResourcesStatus) DeepCopy ¶ added in v1.11.1
func (in *CPURecommendedResourcesStatus) DeepCopy() *CPURecommendedResourcesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPURecommendedResourcesStatus.
func (*CPURecommendedResourcesStatus) DeepCopyInto ¶ added in v1.11.1
func (in *CPURecommendedResourcesStatus) DeepCopyInto(out *CPURecommendedResourcesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CPUSpec ¶
type CPUSpec struct {
// Specifies the number of cores inside the VM. The value must be greater or equal 1.
// +kubebuilder:validation:Format:=int32
// +kubebuilder:validation:Minimum=1
Cores int `json:"cores"`
// Guaranteed share of CPU that will be allocated to the VM. Specified as a percentage,
// or `Auto` to let the Vertical VirtualMachine Autoscaler (EE) manage it: the value
// recommended by the autoscaler is then published in
// `status.recommendedResources.cpu.coreFraction`, and the applied one in
// `status.resources.cpu.coreFraction`.
// The range of available values is defined in the VirtualMachineClass sizing policy.
// If not specified, the default value from the VirtualMachineClass will be used.
// +kubebuilder:validation:Pattern=`^(Auto|(100|[1-9][0-9]?)%)$`
CoreFraction string `json:"coreFraction,omitempty"`
}
CPUSpec specifies the CPU settings for the VM.
func (*CPUSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUSpec.
func (*CPUSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CPUStatus ¶
type CPUStatus struct {
// Current number of cores inside the VM.
Cores int `json:"cores"`
// Current CoreFraction.
CoreFraction string `json:"coreFraction,omitempty"`
// Requested cores.
RequestedCores resource.Quantity `json:"requestedCores,omitempty"`
// runtime overhead.
RuntimeOverhead resource.Quantity `json:"runtimeOverhead,omitempty"`
// Topology with Cores count and Sockets count.
Topology Topology `json:"topology,omitempty"`
}
CPUStatus defines statistics about the CPU resource usage.
func (*CPUStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUStatus.
func (*CPUStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CPUType ¶
type CPUType string
CPUType defines the CPU type, the following options are supported: * `Host`: Uses a virtual CPU with an instruction set closely matching the platform node's CPU. This provides high performance and functionality, as well as compatibility with "live" migration for nodes with similar processor types. For example, VM migration between nodes with Intel and AMD processors will not work. This is also true for different CPU generations, as their instruction set is different. * `HostPassthrough`: Uses the platform node's physical CPU directly, without any modifications. When using this class, the guest VM can only be transferred to a target node with a CPU exactly matching the source node's CPU. * `Discovery`: Create a virtual CPU based on instruction sets of physical CPUs for a selected set of nodes. The feature set is fixed when the resource is created and does not change when nodes are added to or removed from the cluster. * `Model`: CPU model. A CPU model is a named and previously defined set of supported CPU instructions. * `Features`: A required set of supported instructions for the CPU.
+kubebuilder:validation:Enum={Host,HostPassthrough,Discovery,Model,Features}
type Checksum ¶
type Checksum struct {
// +kubebuilder:example:="f3b59bed9f91e32fac1210184fcff6f5"
// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{32}$"
// +kubebuilder:validation:MinLength:=32
// +kubebuilder:validation:MaxLength:=32
MD5 string `json:"md5,omitempty"`
// +kubebuilder:example:="0a0a9f2a6772942557ab5355d76af442f8f65e01"
// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{40}$"
// +kubebuilder:validation:MinLength:=40
// +kubebuilder:validation:MaxLength:=40
SHA1 string `json:"sha1,omitempty"`
// +kubebuilder:example:="78be890d71dde316c412da2ce8332ba47b9ce7a29d573801d2777e01aa20b9b5"
// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{64}$"
// +kubebuilder:validation:MinLength:=64
// +kubebuilder:validation:MaxLength:=64
SHA256 string `json:"sha256,omitempty"`
// +kubebuilder:example:="cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"
// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{128}$"
// +kubebuilder:validation:MinLength:=128
// +kubebuilder:validation:MaxLength:=128
SHA512 string `json:"sha512,omitempty"`
// Checksum according to GOST R 34.11-2012 (Streebog), 256 bits.
// +kubebuilder:example:="3f539a213e97c802cc229d474c6aa32a825a360b2a933a949fd925208d9ce1bb"
// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{64}$"
// +kubebuilder:validation:MinLength:=64
// +kubebuilder:validation:MaxLength:=64
Streebog256 string `json:"streebog256,omitempty"`
// Checksum according to GOST R 34.11-2012 (Streebog), 512 bits.
// +kubebuilder:example:="8e945da209aa869f0455928529bcae4679e9873ab707b55315f56ceb98bef0a7362f715528356ee83cda5f2aac4c6ad2ba3a715c1bcd81cb8e9f90bf4c1c1a8a"
// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{128}$"
// +kubebuilder:validation:MinLength:=128
// +kubebuilder:validation:MaxLength:=128
Streebog512 string `json:"streebog512,omitempty"`
}
func (*Checksum) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Checksum.
func (*Checksum) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVirtualImage ¶
type ClusterVirtualImage struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ClusterVirtualImageSpec `json:"spec"`
Status ClusterVirtualImageStatus `json:"status,omitempty"`
}
Describes a virtual disk image that can be used as a data source for new VirtualDisks or an installation image (iso) to be mounted in VirtualMachines directly. This resource type is available for all namespaces in the cluster.
> This resource cannot be modified once it has been created.
With this resource in the cluster, a container image is created and stored in a dedicated Deckhouse Virtualization Container Registry (DVCR).
**Note:** The `metadata.name` field must comply with [Kubernetes object naming conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/). +kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: ClusterVirtualImage, metadata: {name: example-image}, spec: {dataSource: {http: {url: 'https://example.com/images/disk.img'}, type: HTTP}}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization,backup.deckhouse.io/cluster-config=true} +kubebuilder:resource:categories={virtualization-cluster},scope=Cluster,shortName={cvi},singular=clustervirtualimage +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="CDROM",type=boolean,JSONPath=`.status.cdrom` +kubebuilder:printcolumn:name="Progress",type=string,JSONPath=`.status.progress` +kubebuilder:printcolumn:name="StoredSize",type=string,JSONPath=`.status.size.stored`,priority=1 +kubebuilder:printcolumn:name="UnpackedSize",type=string,JSONPath=`.status.size.unpacked`,priority=1 +kubebuilder:printcolumn:name="Registry URL",type=string,JSONPath=`.status.target.registryURL`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterVirtualImage) DeepCopy ¶
func (in *ClusterVirtualImage) DeepCopy() *ClusterVirtualImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImage.
func (*ClusterVirtualImage) DeepCopyInto ¶
func (in *ClusterVirtualImage) DeepCopyInto(out *ClusterVirtualImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterVirtualImage) DeepCopyObject ¶
func (in *ClusterVirtualImage) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterVirtualImageContainerImage ¶
type ClusterVirtualImageContainerImage struct {
// Path to the image in the container registry.
// +kubebuilder:example:="registry.example.com/images/slackware:15"
// +kubebuilder:validation:Pattern:=`^(?P<name>(?:(?P<domain>(?:(?:localhost|[\w-]+(?:\.[\w-]+)+)(?::\d+)?)|[\w]+:\d+)/)?(?P<image>[a-z0-9_.-]+(?:/[a-z0-9_.-]+)*))(?::(?P<tag>[\w][\w.-]{0,127}))?(?:@(?P<digest>[A-Za-z][A-Za-z0-9]*(?:[+.-_][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,}))?$`
Image string `json:"image"`
ImagePullSecret ImagePullSecret `json:"imagePullSecret,omitempty"`
// CA chain in Base64 format to verify the container registry.
// +kubebuilder:example:="YWFhCg=="
CABundle []byte `json:"caBundle,omitempty"`
}
Use an image stored in external container registry. Only registries with enabled TLS protocol are supported. To provide a custom Certificate Authority (CA) chain, use the `caBundle` field.
func (*ClusterVirtualImageContainerImage) DeepCopy ¶
func (in *ClusterVirtualImageContainerImage) DeepCopy() *ClusterVirtualImageContainerImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageContainerImage.
func (*ClusterVirtualImageContainerImage) DeepCopyInto ¶
func (in *ClusterVirtualImageContainerImage) DeepCopyInto(out *ClusterVirtualImageContainerImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVirtualImageDataSource ¶
type ClusterVirtualImageDataSource struct {
Type DataSourceType `json:"type"`
HTTP *DataSourceHTTP `json:"http,omitempty"`
ContainerImage *ClusterVirtualImageContainerImage `json:"containerImage,omitempty"`
ObjectRef *ClusterVirtualImageObjectRef `json:"objectRef,omitempty"`
Upload *DataSourceUpload `json:"upload,omitempty"`
}
Origin of the image. +kubebuilder:validation:XValidation:rule="self.type == 'HTTP' ? has(self.http) && !has(self.containerImage) && !has(self.objectRef) && !has(self.upload) : true",message="HTTP requires http and cannot have ContainerImage, ObjectRef or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'ContainerImage' ? has(self.containerImage) && !has(self.http) && !has(self.objectRef) && !has(self.upload) : true",message="ContainerImage requires containerImage and cannot have HTTP, ObjectRef or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'ObjectRef' ? has(self.objectRef) && !has(self.http) && !has(self.containerImage) && !has(self.upload) : true",message="ObjectRef requires objectRef and cannot have HTTP, ContainerImage or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'Upload' ? !has(self.http) && !has(self.containerImage) && !has(self.objectRef) : true",message="Upload cannot have HTTP, ContainerImage or ObjectRef."
func (*ClusterVirtualImageDataSource) DeepCopy ¶
func (in *ClusterVirtualImageDataSource) DeepCopy() *ClusterVirtualImageDataSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageDataSource.
func (*ClusterVirtualImageDataSource) DeepCopyInto ¶
func (in *ClusterVirtualImageDataSource) DeepCopyInto(out *ClusterVirtualImageDataSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVirtualImageList ¶
type ClusterVirtualImageList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items provides a list of CVIs.
Items []ClusterVirtualImage `json:"items"`
}
ClusterVirtualImageList provides the needed parameters for requesting a list of ClusterVirtualImages from the system. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterVirtualImageList) DeepCopy ¶
func (in *ClusterVirtualImageList) DeepCopy() *ClusterVirtualImageList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageList.
func (*ClusterVirtualImageList) DeepCopyInto ¶
func (in *ClusterVirtualImageList) DeepCopyInto(out *ClusterVirtualImageList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterVirtualImageList) DeepCopyObject ¶
func (in *ClusterVirtualImageList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterVirtualImageObjectRef ¶
type ClusterVirtualImageObjectRef struct {
Kind ClusterVirtualImageObjectRefKind `json:"kind"`
// Name of the existing VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot resource.
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
// Namespace where the VirtualImage, VirtualDisk or VirtualDiskSnapshot resource is located.
Namespace string `json:"namespace,omitempty"`
}
Use an existing VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot resource to create an image.
+kubebuilder:validation:XValidation:rule="self.kind == 'VirtualImage' || self.kind == 'VirtualDisk' || self.kind == 'VirtualDiskSnapshot' ? has(self.__namespace__) && size(self.__namespace__) > 0 : true",message="The namespace is required for VirtualDisk, VirtualImage and VirtualDiskSnapshot" +kubebuilder:validation:XValidation:rule="self.kind == 'VirtualImage' || self.kind == 'VirtualDisk' || self.kind == 'VirtualDiskSnapshot' ? has(self.__namespace__) && size(self.__namespace__) < 64 : true",message="The namespace must be no longer than 63 characters."
func (*ClusterVirtualImageObjectRef) DeepCopy ¶
func (in *ClusterVirtualImageObjectRef) DeepCopy() *ClusterVirtualImageObjectRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageObjectRef.
func (*ClusterVirtualImageObjectRef) DeepCopyInto ¶
func (in *ClusterVirtualImageObjectRef) DeepCopyInto(out *ClusterVirtualImageObjectRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVirtualImageObjectRefKind ¶
type ClusterVirtualImageObjectRefKind string
Kind of the existing VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot resource. +kubebuilder:validation:Enum:={ClusterVirtualImage,VirtualImage,VirtualDisk,VirtualDiskSnapshot}
const ( ClusterVirtualImageObjectRefKindVirtualImage ClusterVirtualImageObjectRefKind = "VirtualImage" ClusterVirtualImageObjectRefKindClusterVirtualImage ClusterVirtualImageObjectRefKind = "ClusterVirtualImage" ClusterVirtualImageObjectRefKindVirtualDisk ClusterVirtualImageObjectRefKind = "VirtualDisk" ClusterVirtualImageObjectRefKindVirtualDiskSnapshot ClusterVirtualImageObjectRefKind = "VirtualDiskSnapshot" )
type ClusterVirtualImageSpec ¶
type ClusterVirtualImageSpec struct {
DataSource ClusterVirtualImageDataSource `json:"dataSource"`
}
func (*ClusterVirtualImageSpec) DeepCopy ¶
func (in *ClusterVirtualImageSpec) DeepCopy() *ClusterVirtualImageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageSpec.
func (*ClusterVirtualImageSpec) DeepCopyInto ¶
func (in *ClusterVirtualImageSpec) DeepCopyInto(out *ClusterVirtualImageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVirtualImageStatus ¶
type ClusterVirtualImageStatus struct {
// Image download speed from an external source. Appears only during the `Provisioning` phase.
DownloadSpeed *StatusSpeed `json:"downloadSpeed,omitempty"`
// Discovered image size data.
Size ImageStatusSize `json:"size,omitempty"`
// Discovered image format.
Format string `json:"format,omitempty"`
// Defines whether the image is in a format that needs to be mounted as a CD-ROM drive, such as iso and so on.
CDROM bool `json:"cdrom,omitempty"`
// Current status of the ClusterVirtualImage resource:
// * `Pending`: The resource has been created and is on a waiting queue.
// * `Provisioning`: The resource is being created: copying, downloading, or building of the image is in progress.
// * `WaitForUserUpload`: Waiting for the user to upload the image. The endpoint to upload the image is specified in `.status.uploadCommand`.
// * `Ready`: The resource has been created and is ready to use.
// * `Failed`: There was an error when creating the resource.
// * `Terminating`: The resource is being deleted.
// * `ImageLost`: The image is missing in DVCR. The resource cannot be used.
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating,ImageLost}
Phase ImagePhase `json:"phase,omitempty"`
// Progress of copying an image from the source to DVCR. Appears only during the `Provisioning' phase.
Progress string `json:"progress,omitempty"`
// UID of the source (VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot) used when creating the cluster virtual image.
SourceUID *types.UID `json:"sourceUID,omitempty"`
// The latest available observations of an object's current state.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Deprecated. Use `imageUploadURLs` instead.
UploadCommand string `json:"uploadCommand,omitempty"`
ImageUploadURLs *ImageUploadURLs `json:"imageUploadURLs,omitempty"`
Target ClusterVirtualImageStatusTarget `json:"target,omitempty"`
// Displays the list of namespaces where the image is currently used.
UsedInNamespaces []string `json:"usedInNamespaces,omitempty"`
}
func (*ClusterVirtualImageStatus) DeepCopy ¶
func (in *ClusterVirtualImageStatus) DeepCopy() *ClusterVirtualImageStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageStatus.
func (*ClusterVirtualImageStatus) DeepCopyInto ¶
func (in *ClusterVirtualImageStatus) DeepCopyInto(out *ClusterVirtualImageStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVirtualImageStatusTarget ¶
type ClusterVirtualImageStatusTarget struct {
// Created image in DVCR.
// +kubebuilder:example:="dvcr.<dvcr-namespace>.svc/cvi/<image-name>:latest"
RegistryURL string `json:"registryURL,omitempty"`
}
func (*ClusterVirtualImageStatusTarget) DeepCopy ¶
func (in *ClusterVirtualImageStatusTarget) DeepCopy() *ClusterVirtualImageStatusTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageStatusTarget.
func (*ClusterVirtualImageStatusTarget) DeepCopyInto ¶
func (in *ClusterVirtualImageStatusTarget) DeepCopyInto(out *ClusterVirtualImageStatusTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoreFractionValue ¶
type CoreFractionValue int
+kubebuilder:validation:Minimum=1 +kubebuilder:validation:Maximum=100
type CpuDiscovery ¶
type CpuDiscovery struct {
// A selection of nodes to be used as the basis for creating a universal CPU model.
NodeSelector metav1.LabelSelector `json:"nodeSelector,omitempty"`
}
func (*CpuDiscovery) DeepCopy ¶
func (in *CpuDiscovery) DeepCopy() *CpuDiscovery
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CpuDiscovery.
func (*CpuDiscovery) DeepCopyInto ¶
func (in *CpuDiscovery) DeepCopyInto(out *CpuDiscovery)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CpuFeatures ¶
type CpuFeatures struct {
// List of CPU features for this model.
//
// +kubebuilder:example={mmx, vmx, sse2}
Enabled []string `json:"enabled,omitempty"`
// List of unused processor features additionally available for a given group of nodes.
//
// +kubebuilder:example={ssse3, vme}
NotEnabledCommon []string `json:"notEnabledCommon,omitempty"`
}
CpuFeatures Information on CPU features supported by this model. Shown only for `Features` or `Discovery` types.
func (*CpuFeatures) DeepCopy ¶
func (in *CpuFeatures) DeepCopy() *CpuFeatures
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CpuFeatures.
func (*CpuFeatures) DeepCopyInto ¶
func (in *CpuFeatures) DeepCopyInto(out *CpuFeatures)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DataSourceHTTP ¶
type DataSourceHTTP struct {
// Checksum to verify integrity and consistency of the downloaded file. The file must match all specified checksums.
Checksum *Checksum `json:"checksum,omitempty"`
// URL of the file for creating an image. The following file formats are supported:
// * qcow2
// * vmdk
// * vdi
// * iso
// * raw
// The file can be compressed into an archive in one of the following formats:
// * gz
// * xz
// +kubebuilder:example:="https://mirror.example.com/images/slackware-15.qcow.gz"
// +kubebuilder:validation:Pattern=`^http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$`
URL string `json:"url"`
// CA chain in Base64 format to verify the URL.
// +kubebuilder:example:="YWFhCg=="
CABundle []byte `json:"caBundle,omitempty"`
}
Fill the image with data from an external URL. The following schemas are supported:
* HTTP * HTTPS
For HTTPS schema, there is an option to skip the TLS verification.
func (*DataSourceHTTP) DeepCopy ¶
func (in *DataSourceHTTP) DeepCopy() *DataSourceHTTP
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSourceHTTP.
func (*DataSourceHTTP) DeepCopyInto ¶
func (in *DataSourceHTTP) DeepCopyInto(out *DataSourceHTTP)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DataSourceType ¶
type DataSourceType string
The following image sources are available for creating an image:
* `HTTP`: From a file published on an HTTP/HTTPS service at a given URL. * `ContainerImage`: From another image stored in a container registry. * `ObjectRef`: From an existing resource. * `Upload`: From data uploaded by the user via a special interface.
+kubebuilder:validation:Enum:={HTTP,ContainerImage,ObjectRef,Upload}
const ( DataSourceTypeHTTP DataSourceType = "HTTP" DataSourceTypeContainerImage DataSourceType = "ContainerImage" DataSourceTypeObjectRef DataSourceType = "ObjectRef" DataSourceTypeUpload DataSourceType = "Upload" )
type DataSourceUpload ¶ added in v1.11.1
type DataSourceUpload struct {
// Checksum to verify integrity and consistency of the uploaded file. The file must match all specified checksums.
//
// The checksums are calculated over the bytes the client sends, before any
// conversion of the image, so they are the checksums of the very file being
// uploaded.
Checksum *Checksum `json:"checksum,omitempty"`
}
Fill the image with data the user uploads through the upload interface.
func (*DataSourceUpload) DeepCopy ¶ added in v1.11.1
func (in *DataSourceUpload) DeepCopy() *DataSourceUpload
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSourceUpload.
func (*DataSourceUpload) DeepCopyInto ¶ added in v1.11.1
func (in *DataSourceUpload) DeepCopyInto(out *DataSourceUpload)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiskPhase ¶
type DiskPhase string
Current status of the VirtualDisk resource: * `Pending`: The resource has been created and is on a waiting queue. * `Provisioning`: The resource is being created: copying, downloading, loading data to the PVC, or extending the PVC. * `WaitForUserUpload`: Waiting for the user to upload the image. The endpoint to upload the image is specified in `.status.uploadCommand`. * `WaitForFirstConsumer`: Waiting for the virtual machine using the disk to be assigned to the node. * `Ready`: The resource has been created and is ready to use. * `Resizing`: The process of resource resizing is in progress. * `Failed`: There was an error when creating the resource. * `PVCLost`: The child PVC of the resource is missing. The resource cannot be used. * `Exporting`: The child PV of the resource is in the process of exporting. * `Terminating`: The resource is being deleted. * `Migrating`: The resource is being migrating. +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,WaitForFirstConsumer,Ready,Resizing,Failed,PVCLost,Exporting,Terminating,Migrating}
const ( DiskPending DiskPhase = "Pending" DiskProvisioning DiskPhase = "Provisioning" DiskWaitForUserUpload DiskPhase = "WaitForUserUpload" DiskWaitForFirstConsumer DiskPhase = "WaitForFirstConsumer" DiskReady DiskPhase = "Ready" DiskResizing DiskPhase = "Resizing" DiskFailed DiskPhase = "Failed" DiskLost DiskPhase = "PVCLost" DiskExporting DiskPhase = "Exporting" DiskTerminating DiskPhase = "Terminating" DiskMigrating DiskPhase = "Migrating" )
type DiskTarget ¶
type DiskTarget struct {
// Created PersistentVolumeClaim name for the Kubernetes storage.
PersistentVolumeClaim string `json:"persistentVolumeClaimName,omitempty"`
}
func (*DiskTarget) DeepCopy ¶
func (in *DiskTarget) DeepCopy() *DiskTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskTarget.
func (*DiskTarget) DeepCopyInto ¶
func (in *DiskTarget) DeepCopyInto(out *DiskTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Disruptions ¶
type Disruptions struct {
RestartApprovalMode RestartApprovalMode `json:"restartApprovalMode,omitempty"`
}
Disruptions describes the policy for applying changes that require rebooting the VM Changes to some VM configuration settings require a reboot of the VM to apply them. This policy allows you to specify the behavior of how the VM will respond to such changes.
func (*Disruptions) DeepCopy ¶
func (in *Disruptions) DeepCopy() *Disruptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Disruptions.
func (*Disruptions) DeepCopyInto ¶
func (in *Disruptions) DeepCopyInto(out *Disruptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GPUDeviceSpec ¶ added in v1.11.1
type GPUDeviceSpec struct {
// Name of the GPUClass that selects the GPU to attach, for example nvidia-h100.
// The GPUClass must already exist: a DRA DeviceClass with the same name is
// created by the GPU module and is used to allocate the device.
// +kubebuilder:validation:MinLength:=1
// +kubebuilder:validation:MaxLength:=253
// +kubebuilder:validation:Pattern:=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
GPUClassName string `json:"gpuClassName"`
}
GPUDeviceSpec requests a GPU device by GPUClass.
func (*GPUDeviceSpec) DeepCopy ¶ added in v1.11.1
func (in *GPUDeviceSpec) DeepCopy() *GPUDeviceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUDeviceSpec.
func (*GPUDeviceSpec) DeepCopyInto ¶ added in v1.11.1
func (in *GPUDeviceSpec) DeepCopyInto(out *GPUDeviceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImagePhase ¶
type ImagePhase string
const ( ImagePending ImagePhase = "Pending" ImageWaitForUserUpload ImagePhase = "WaitForUserUpload" ImageProvisioning ImagePhase = "Provisioning" ImageReady ImagePhase = "Ready" ImageFailed ImagePhase = "Failed" ImageTerminating ImagePhase = "Terminating" ImageLost ImagePhase = "ImageLost" ImagePVCLost ImagePhase = "PVCLost" )
type ImagePullSecret ¶
type ImagePullSecret struct {
// Name of the secret keeping container registry credentials.
Name string `json:"name,omitempty"`
// Namespace where `imagePullSecret` is located.
Namespace string `json:"namespace,omitempty"`
}
func (*ImagePullSecret) DeepCopy ¶
func (in *ImagePullSecret) DeepCopy() *ImagePullSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecret.
func (*ImagePullSecret) DeepCopyInto ¶
func (in *ImagePullSecret) DeepCopyInto(out *ImagePullSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImagePullSecretName ¶
type ImagePullSecretName struct {
// Name of the secret keeping container registry credentials, which must be located in the same namespace.
Name string `json:"name,omitempty"`
}
func (*ImagePullSecretName) DeepCopy ¶
func (in *ImagePullSecretName) DeepCopy() *ImagePullSecretName
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecretName.
func (*ImagePullSecretName) DeepCopyInto ¶
func (in *ImagePullSecretName) DeepCopyInto(out *ImagePullSecretName)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageStatusSize ¶
type ImageStatusSize struct {
// Image size in human-readable format.
// +kubebuilder:example:="199M"
Stored string `json:"stored,omitempty"`
// Image size in bytes.
// +kubebuilder:example:=199001234
StoredBytes string `json:"storedBytes,omitempty"`
// Unpacked image size in human-readable format.
// +kubebuilder:example:="1G"
Unpacked string `json:"unpacked,omitempty"`
// Unpacked image size in bytes.
// +kubebuilder:example:=1000000234
UnpackedBytes string `json:"unpackedBytes,omitempty"`
}
Discovered sizes of the image.
func (*ImageStatusSize) DeepCopy ¶
func (in *ImageStatusSize) DeepCopy() *ImageStatusSize
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatusSize.
func (*ImageStatusSize) DeepCopyInto ¶
func (in *ImageStatusSize) DeepCopyInto(out *ImageStatusSize)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageUploadURLs ¶
type ImageUploadURLs struct {
// Command to upload the image using `Ingress` from outside the cluster.
External string `json:"external,omitempty"`
// Command to upload the image using `Service` within the cluster.
InCluster string `json:"inCluster,omitempty"`
}
func (*ImageUploadURLs) DeepCopy ¶
func (in *ImageUploadURLs) DeepCopy() *ImageUploadURLs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageUploadURLs.
func (*ImageUploadURLs) DeepCopyInto ¶
func (in *ImageUploadURLs) DeepCopyInto(out *ImageUploadURLs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KeepIPAddress ¶
type KeepIPAddress string
KeepIPAddress defines whether to keep the IP address of a virtual machine or not:
* `Always`: When creating a snapshot, the virtual machine's IP address will be converted from `Auto` to `Static` and saved. * `Never`: When creating a snapshot, the virtual machine's IP address will not be converted.
+kubebuilder:validation:Enum={Always,Never}
const ( KeepIPAddressAlways KeepIPAddress = "Always" KeepIPAddressNever KeepIPAddress = "Never" )
type LiveMigrationPolicy ¶ added in v1.0.0
type LiveMigrationPolicy string
LiveMigrationPolicy defines policy for live migration process: * `Never` - This VM is not eligible for live migration. * `Manual` - This VM is eligible for migrations triggered by user, no automatic migrations. * `AlwaysSafe` - Use Safe options for automatic and VMOP migrations. Do not enable CPU throttling. * `PreferSafe` - Use Safe options for automatic migrations. CPU throttling can be enabled with force=true in VMOP. * `AlwaysForced` - Enable CPU throttling for automatic and VMOP migrations. No way to disable CPU throttling. * `PreferForced` - Enable CPU throttling for automatic migrations. CPU throttling can be disabled with force=false in VMOP.
+kubebuilder:validation:Enum={Manual,Never,AlwaysSafe,PreferSafe,AlwaysForced,PreferForced}
const ( ManualMigrationPolicy LiveMigrationPolicy = "Manual" NeverMigrationPolicy LiveMigrationPolicy = "Never" AlwaysSafeMigrationPolicy LiveMigrationPolicy = "AlwaysSafe" PreferSafeMigrationPolicy LiveMigrationPolicy = "PreferSafe" AlwaysForcedMigrationPolicy LiveMigrationPolicy = "AlwaysForced" PreferForcedMigrationPolicy LiveMigrationPolicy = "PreferForced" )
type MachinePhase ¶
type MachinePhase string
MachinePhase defines current phase of the virtual machine: * `Pending` - The process of starting the VM is in progress. * `Running` - VM is running. * `Degraded` - An error occurred during the startup process or while the VM is running. * `Terminating` - The VM is currently in the process of shutting down. * `Stopped` - The VM is stopped. +kubebuilder:validation:Enum:={Pending,Running,Terminating,Stopped,Stopping,Starting,Migrating,Pause,Degraded}
const ( MachinePending MachinePhase = "Pending" MachineRunning MachinePhase = "Running" MachineTerminating MachinePhase = "Terminating" MachineStopped MachinePhase = "Stopped" MachineStopping MachinePhase = "Stopping" MachineStarting MachinePhase = "Starting" MachineMigrating MachinePhase = "Migrating" MachinePause MachinePhase = "Pause" MachineDegraded MachinePhase = "Degraded" )
type MemoryMinMax ¶
type MemoryMinMax struct {
// Minimum amount of memory.
//
// +kubebuilder:example="1Gi"
Min *resource.Quantity `json:"min,omitempty"`
// Maximum amount of memory.
//
// +kubebuilder:example="8Gi"
Max *resource.Quantity `json:"max,omitempty"`
}
func (*MemoryMinMax) DeepCopy ¶
func (in *MemoryMinMax) DeepCopy() *MemoryMinMax
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryMinMax.
func (*MemoryMinMax) DeepCopyInto ¶
func (in *MemoryMinMax) DeepCopyInto(out *MemoryMinMax)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemorySpec ¶
MemorySpec specifies the memory settings for the VM.
func (*MemorySpec) DeepCopy ¶
func (in *MemorySpec) DeepCopy() *MemorySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemorySpec.
func (*MemorySpec) DeepCopyInto ¶
func (in *MemorySpec) DeepCopyInto(out *MemorySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemoryStatus ¶
type MemoryStatus struct {
// Current memory size.
Size resource.Quantity `json:"size"`
// Memory runtime overhead.
RuntimeOverhead resource.Quantity `json:"runtimeOverhead,omitempty"`
}
MemoryStatus defines statistics about the Memory resource usage.
func (*MemoryStatus) DeepCopy ¶
func (in *MemoryStatus) DeepCopy() *MemoryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryStatus.
func (*MemoryStatus) DeepCopyInto ¶
func (in *MemoryStatus) DeepCopyInto(out *MemoryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MigrationResult ¶
type MigrationResult string
MigrationResult defines a migration result +kubebuilder:validation:Enum:={"Succeeded","Failed",""}
const ( MigrationResultSucceeded MigrationResult = "Succeeded" MigrationResultFailed MigrationResult = "Failed" )
type NameReplacement ¶
type NameReplacement struct {
// Selector to choose resources for name replacement.
From NameReplacementFrom `json:"from"`
// New resource name.
// +kubebuilder:validation:MinLength=1
To string `json:"to"`
}
NameReplacement represents a rule for redefining the virtual machine resource names.
func (*NameReplacement) DeepCopy ¶
func (in *NameReplacement) DeepCopy() *NameReplacement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameReplacement.
func (*NameReplacement) DeepCopyInto ¶
func (in *NameReplacement) DeepCopyInto(out *NameReplacement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NameReplacementFrom ¶
type NameReplacementFrom struct {
// Kind of a resource to rename.
// +kubebuilder:validation:MinLength=1
Kind string `json:"kind,omitempty"`
// Current name of a resource to rename.
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
}
NameReplacementFrom represents a selector to choose resources for name replacement.
func (*NameReplacementFrom) DeepCopy ¶
func (in *NameReplacementFrom) DeepCopy() *NameReplacementFrom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameReplacementFrom.
func (*NameReplacementFrom) DeepCopyInto ¶
func (in *NameReplacementFrom) DeepCopyInto(out *NameReplacementFrom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworksSpec ¶ added in v1.0.0
type NetworksSpec struct {
ID *int `json:"id,omitempty"`
Type string `json:"type"`
Name string `json:"name,omitempty"`
VirtualMachineMACAddressName string `json:"virtualMachineMACAddressName,omitempty"`
// IPAddressName is the name of the `IPAddress` resource (SDN module, network.deckhouse.io/v1alpha1)
// to use for a static IP address on this additional network interface.
// If specified, the referenced IPAddress is used instead of automatic allocation from the network pool.
// Only applicable to additional networks (Network, ClusterNetwork) with IPAM configured (a pool bound to the network).
// Ignored if the network has no pool.
IPAddressName string `json:"ipAddressName,omitempty"`
}
func (*NetworksSpec) DeepCopy ¶ added in v1.0.0
func (in *NetworksSpec) DeepCopy() *NetworksSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworksSpec.
func (*NetworksSpec) DeepCopyInto ¶ added in v1.0.0
func (in *NetworksSpec) DeepCopyInto(out *NetworksSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworksStatus ¶ added in v1.0.0
type NetworksStatus struct {
ID int `json:"id,omitempty"`
Type string `json:"type"`
Name string `json:"name,omitempty"`
MAC string `json:"macAddress,omitempty"`
VirtualMachineMACAddressName string `json:"virtualMachineMACAddressName,omitempty"`
// IPAddress is the IP address allocated for this additional network interface by SDN (from the network pool).
// Populated from the pod's network.deckhouse.io/networks-status annotation (ipAddressConfigs[].address).
// Empty for the Main network or when the additional network has no pool configured.
IPAddress string `json:"ipAddress,omitempty"`
}
func (*NetworksStatus) DeepCopy ¶ added in v1.0.0
func (in *NetworksStatus) DeepCopy() *NetworksStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworksStatus.
func (*NetworksStatus) DeepCopyInto ¶ added in v1.0.0
func (in *NetworksStatus) DeepCopyInto(out *NetworksStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeSelector ¶
type NodeSelector struct {
// A map of {key,value} pairs.
// A single {key,value} pair in the matchLabels map is equivalent to an element of matchExpressions whose key field is "key", operator is "In", and the value array contains only "value".
// The requirements are ANDed.
MatchLabels map[string]string `json:"matchLabels,omitempty"`
// A list of node selector requirements by node's labels.
MatchExpressions []corev1.NodeSelectorRequirement `json:"matchExpressions,omitempty"`
}
NodeSelector defines the nodes targeted for VM scheduling.
func (*NodeSelector) DeepCopy ¶
func (in *NodeSelector) DeepCopy() *NodeSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSelector.
func (*NodeSelector) DeepCopyInto ¶
func (in *NodeSelector) DeepCopyInto(out *NodeSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeUSBDevice ¶ added in v1.6.0
type NodeUSBDevice struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NodeUSBDeviceSpec `json:"spec"`
Status NodeUSBDeviceStatus `json:"status,omitempty"`
}
Represents a USB device discovered on a specific node in the cluster. The module controller creates this resource from Kubernetes API data (ResourceSlice) published by the DRA driver. +genclient +genclient:nonNamespaced +kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: NodeUSBDevice, metadata: {name: example-usb}, spec: {assignedNamespace: workloads}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:resource:categories={virtualization},scope=Cluster,shortName={nusb},singular=nodeusbdevice +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Node",type=string,JSONPath=`.status.nodeName` +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` +kubebuilder:printcolumn:name="Assigned",type=string,JSONPath=`.status.conditions[?(@.type=="Assigned")].status` +kubebuilder:printcolumn:name="Attached",type=string,JSONPath=`.status.conditions[?(@.type=="Attached")].status` +kubebuilder:printcolumn:name="Namespace",type=string,JSONPath=`.spec.assignedNamespace` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*NodeUSBDevice) DeepCopy ¶ added in v1.6.0
func (in *NodeUSBDevice) DeepCopy() *NodeUSBDevice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUSBDevice.
func (*NodeUSBDevice) DeepCopyInto ¶ added in v1.6.0
func (in *NodeUSBDevice) DeepCopyInto(out *NodeUSBDevice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeUSBDevice) DeepCopyObject ¶ added in v1.6.0
func (in *NodeUSBDevice) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeUSBDeviceAttributes ¶ added in v1.6.0
type NodeUSBDeviceAttributes struct {
// BCD (Binary Coded Decimal) device version.
BCD string `json:"bcd,omitempty"`
// USB bus number.
Bus string `json:"bus,omitempty"`
// USB device number on the bus.
DeviceNumber string `json:"deviceNumber,omitempty"`
// Device path in the filesystem.
DevicePath string `json:"devicePath,omitempty"`
// Major device number.
Major int `json:"major,omitempty"`
// Minor device number.
Minor int `json:"minor,omitempty"`
// Device speed.
Speed int `json:"speed,omitempty"`
// Device name.
Name string `json:"name,omitempty"`
// USB vendor ID in hexadecimal format.
VendorID string `json:"vendorID,omitempty"`
// USB product ID in hexadecimal format.
ProductID string `json:"productID,omitempty"`
// Device serial number.
Serial string `json:"serial,omitempty"`
// Device manufacturer name.
Manufacturer string `json:"manufacturer,omitempty"`
// Device product name.
Product string `json:"product,omitempty"`
// Node name where the device is located.
NodeName string `json:"nodeName,omitempty"`
}
NodeUSBDeviceAttributes contains all attributes of a USB device.
func (*NodeUSBDeviceAttributes) DeepCopy ¶ added in v1.6.0
func (in *NodeUSBDeviceAttributes) DeepCopy() *NodeUSBDeviceAttributes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUSBDeviceAttributes.
func (*NodeUSBDeviceAttributes) DeepCopyInto ¶ added in v1.6.0
func (in *NodeUSBDeviceAttributes) DeepCopyInto(out *NodeUSBDeviceAttributes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeUSBDeviceList ¶ added in v1.6.0
type NodeUSBDeviceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items provides a list of NodeUSBDevices.
Items []NodeUSBDevice `json:"items"`
}
NodeUSBDeviceList provides the needed parameters for requesting a list of NodeUSBDevices from the system. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*NodeUSBDeviceList) DeepCopy ¶ added in v1.6.0
func (in *NodeUSBDeviceList) DeepCopy() *NodeUSBDeviceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUSBDeviceList.
func (*NodeUSBDeviceList) DeepCopyInto ¶ added in v1.6.0
func (in *NodeUSBDeviceList) DeepCopyInto(out *NodeUSBDeviceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeUSBDeviceList) DeepCopyObject ¶ added in v1.6.0
func (in *NodeUSBDeviceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeUSBDeviceSpec ¶ added in v1.6.0
type NodeUSBDeviceSpec struct {
// AssignedNamespace in which the device usage is allowed. By default, created with an empty value "".
// When set, a corresponding USBDevice resource is created in this namespace.
// +kubebuilder:default:=""
AssignedNamespace string `json:"assignedNamespace,omitempty"`
}
func (*NodeUSBDeviceSpec) DeepCopy ¶ added in v1.6.0
func (in *NodeUSBDeviceSpec) DeepCopy() *NodeUSBDeviceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUSBDeviceSpec.
func (*NodeUSBDeviceSpec) DeepCopyInto ¶ added in v1.6.0
func (in *NodeUSBDeviceSpec) DeepCopyInto(out *NodeUSBDeviceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeUSBDeviceStatus ¶ added in v1.6.0
type NodeUSBDeviceStatus struct {
// All device attributes obtained through DRA for the device.
Attributes NodeUSBDeviceAttributes `json:"attributes,omitempty"`
// Name of the node where the USB device is located.
NodeName string `json:"nodeName,omitempty"`
// The latest available observations of an object's current state.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
func (*NodeUSBDeviceStatus) DeepCopy ¶ added in v1.6.0
func (in *NodeUSBDeviceStatus) DeepCopy() *NodeUSBDeviceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeUSBDeviceStatus.
func (*NodeUSBDeviceStatus) DeepCopyInto ¶ added in v1.6.0
func (in *NodeUSBDeviceStatus) DeepCopyInto(out *NodeUSBDeviceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OsType ¶
type OsType string
The OsType parameter allows you to select the type of used OS, for which a VM with an optimal set of required virtual devices and parameters will be created.
* Windows - for Microsoft Windows family operating systems. * Generic - for other types of OS. * Legacy - for operating systems with no built-in AHCI or virtio drivers (Windows XP, 2000, Server 2003, DOS-era systems, Linux kernels older than 2.6.19): the i440fx chipset and `BIOS` only. Set `enableParavirtualization` to false to get an IDE bus, an RTL8139 adapter and a limit of 4 block devices; with it on, disks move to virtio-blk while the CD-ROM stays on IDE. Provisioning, changing `.spec.blockDeviceRefs` on a running VM, CPU and memory hot-plugging are unavailable, and the guest agent is reported as an unsupported version. +kubebuilder:validation:Enum={Windows,Generic,Legacy}
type Provisioning ¶
type Provisioning struct {
Type ProvisioningType `json:"type"`
// Inline cloud-init userdata script.
UserData string `json:"userData,omitempty"`
UserDataRef *UserDataRef `json:"userDataRef,omitempty"`
SysprepRef *SysprepRef `json:"sysprepRef,omitempty"`
}
Provisioning is a block allows you to configure the provisioning script for the VM.
+kubebuilder:validation:XValidation:rule="self.type == 'UserData' ? has(self.userData) && !has(self.userDataRef) && !has(self.sysprepRef) : true",message="UserData cannot have userDataRef or sysprepRef." +kubebuilder:validation:XValidation:rule="self.type == 'UserDataRef' ? has(self.userDataRef) && !has(self.userData) && !has(self.sysprepRef) : true",message="UserDataRef cannot have userData or sysprepRef." +kubebuilder:validation:XValidation:rule="self.type == 'SysprepRef' ? has(self.sysprepRef) && !has(self.userData) && !has(self.userDataRef) : true",message="SysprepRef cannot have userData or userDataRef."
func (*Provisioning) DeepCopy ¶
func (in *Provisioning) DeepCopy() *Provisioning
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Provisioning.
func (*Provisioning) DeepCopyInto ¶
func (in *Provisioning) DeepCopyInto(out *Provisioning)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProvisioningType ¶
type ProvisioningType string
ProvisioningType parameter defines the type of provisioning script:
Parameters supported for using the provisioning script: * UserData - use the cloud-init in the .spec.provisioning.UserData section. * UserDataRef - use a cloud-init script that resides in a different resource. * SysprepRef - Use a Windows Automation script that resides in a different resource. More information: https://cloudinit.readthedocs.io/en/latest/reference/examples.html
const ( ProvisioningTypeUserData ProvisioningType = "UserData" ProvisioningTypeUserDataRef ProvisioningType = "UserDataRef" ProvisioningTypeSysprepRef ProvisioningType = "SysprepRef" )
type RecommendedResourcesStatus ¶ added in v1.11.1
type RecommendedResourcesStatus struct {
CPU CPURecommendedResourcesStatus `json:"cpu,omitempty"`
}
RecommendedResourcesStatus defines the resource values recommended by the Vertical VirtualMachine Autoscaler (EE). They are what the autoscaler asks for; the values actually applied to the VM are published in `status.resources`.
func (*RecommendedResourcesStatus) DeepCopy ¶ added in v1.11.1
func (in *RecommendedResourcesStatus) DeepCopy() *RecommendedResourcesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendedResourcesStatus.
func (*RecommendedResourcesStatus) DeepCopyInto ¶ added in v1.11.1
func (in *RecommendedResourcesStatus) DeepCopyInto(out *RecommendedResourcesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRef ¶ added in v1.0.0
type ResourceRef struct {
// Kind of the resource.
Kind string `json:"kind,omitempty"`
// API version of the resource.
ApiVersion string `json:"apiVersion,omitempty"`
// Name of the resource.
Name string `json:"name,omitempty"`
}
func (*ResourceRef) DeepCopy ¶ added in v1.0.0
func (in *ResourceRef) DeepCopy() *ResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (*ResourceRef) DeepCopyInto ¶ added in v1.0.0
func (in *ResourceRef) DeepCopyInto(out *ResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourcesStatus ¶
type ResourcesStatus struct {
CPU CPUStatus `json:"cpu,omitempty"`
Memory MemoryStatus `json:"memory,omitempty"`
}
ResourcesStatus defines resource usage statistics.
func (*ResourcesStatus) DeepCopy ¶
func (in *ResourcesStatus) DeepCopy() *ResourcesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcesStatus.
func (*ResourcesStatus) DeepCopyInto ¶
func (in *ResourcesStatus) DeepCopyInto(out *ResourcesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestartApprovalMode ¶
type RestartApprovalMode string
RestartApprovalMode defines a restart approving mode: Manual or Automatic. +kubebuilder:validation:Enum={Manual,Automatic}
const ( Automatic RestartApprovalMode = "Automatic" Manual RestartApprovalMode = "Manual" )
type RunPolicy ¶
type RunPolicy string
RunPolicy parameter defines the VM startup policy * `AlwaysOn` - after creation the VM is always in a running state, even in case of its shutdown by OS means. * `AlwaysOff` - after creation the VM is always in the off state. * `Manual` - after creation the VM is switched off, the VM state (switching on/off) is controlled via sub-resources or OS means. * `AlwaysOnUnlessStoppedManually` - after creation the VM is always in a running state. The VM can be shutdown by means of the OS or use the d8 utility: `d8 v stop <vm_name>`.
+kubebuilder:validation:Enum={AlwaysOn,AlwaysOff,Manual,AlwaysOnUnlessStoppedManually}
type ScaleDownPolicy ¶ added in v1.11.1
type ScaleDownPolicy string
ScaleDownPolicy selects which replica is removed on anonymous scale-down.
const ( ScaleDownPolicyNewestFirst ScaleDownPolicy = "NewestFirst" ScaleDownPolicyOldestFirst ScaleDownPolicy = "OldestFirst" ScaleDownPolicyExplicit ScaleDownPolicy = "Explicit" )
type SizingPolicy ¶
type SizingPolicy struct {
// Memory sizing policy.
Memory *SizingPolicyMemory `json:"memory,omitempty"`
// Allowed values of the `coreFraction` parameter.
CoreFractions []CoreFractionValue `json:"coreFractions,omitempty"`
// A default `CoreFraction` value for a `VirtualMachine` if it is not provided:
// a percentage from 1 to 100, or the string `Auto` to hand the core fraction over
// to the Vertical VirtualMachine Autoscaler (EE). `Auto` is never an allowed value
// of `coreFractions` — it is a mode, not a share of a CPU core.
//
// +kubebuilder:validation:XIntOrString
// +kubebuilder:validation:MaxLength=4
// +kubebuilder:validation:XValidation:rule="type(self) == int ? self >= 1 && self <= 100 : self == 'Auto'",message="The default core fraction must be a number from 1 to 100, or 'Auto'."
// +kubebuilder:example=50
DefaultCoreFraction *intstr.IntOrString `json:"defaultCoreFraction,omitempty"`
// Allowed values of the `dedicatedCores` parameter.
DedicatedCores []bool `json:"dedicatedCores,omitempty"`
// The policy applies for a specified range of the number of CPU cores.
// +kubebuilder:validation:Required
Cores *SizingPolicyCores `json:"cores,omitempty"`
}
SizingPolicy defines a policy for allocating computational resources to VMs. It is represented as a list. The cores.min - cores.max ranges for different elements of the list must not overlap.
func (*SizingPolicy) DeepCopy ¶
func (in *SizingPolicy) DeepCopy() *SizingPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SizingPolicy.
func (*SizingPolicy) DeepCopyInto ¶
func (in *SizingPolicy) DeepCopyInto(out *SizingPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SizingPolicyCores ¶
type SizingPolicyCores struct {
// Minimum number of CPU cores.
//
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum=1
// +kubebuilder:example=1
Min int `json:"min"`
// Maximum number of CPU cores.
//
// +kubebuilder:validation:Required
// +kubebuilder:validation:Maximum=1024
// +kubebuilder:example=10
Max int `json:"max"`
// Discretization step for the CPU core number. For example, the combination of `min=2`, `max=10`, and `step=4` allows to set the number of virtual machine CPU cores to 2, 6, or 10.
//
// +kubebuilder:validation:Minimum=1
// +kubebuilder:example=1
Step int `json:"step,omitempty"`
}
+kubebuilder:validation:XValidation:rule="self.max > self.min",message="The maximum must be greater than the minimum" +kubebuilder:validation:XValidation:rule="has(self.step) ? self.max > self.step : true",message="The maximum must be greater than the step"
func (*SizingPolicyCores) DeepCopy ¶
func (in *SizingPolicyCores) DeepCopy() *SizingPolicyCores
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SizingPolicyCores.
func (*SizingPolicyCores) DeepCopyInto ¶
func (in *SizingPolicyCores) DeepCopyInto(out *SizingPolicyCores)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SizingPolicyMemory ¶
type SizingPolicyMemory struct {
MemoryMinMax `json:",inline"`
// Memory size discretization step. For example, the combination of `min=2Gi, `max=4Gi` and `step=1Gi` allows to set the virtual machine memory size to 2Gi, 3Gi, or 4Gi.
//
// +kubebuilder:example="512Mi"
Step *resource.Quantity `json:"step,omitempty"`
// Amount of memory per CPU core.
PerCore *SizingPolicyMemoryPerCore `json:"perCore,omitempty"`
}
func (*SizingPolicyMemory) DeepCopy ¶
func (in *SizingPolicyMemory) DeepCopy() *SizingPolicyMemory
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SizingPolicyMemory.
func (*SizingPolicyMemory) DeepCopyInto ¶
func (in *SizingPolicyMemory) DeepCopyInto(out *SizingPolicyMemory)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SizingPolicyMemoryPerCore ¶
type SizingPolicyMemoryPerCore struct {
MemoryMinMax `json:",inline"`
}
func (*SizingPolicyMemoryPerCore) DeepCopy ¶
func (in *SizingPolicyMemoryPerCore) DeepCopy() *SizingPolicyMemoryPerCore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SizingPolicyMemoryPerCore.
func (*SizingPolicyMemoryPerCore) DeepCopyInto ¶
func (in *SizingPolicyMemoryPerCore) DeepCopyInto(out *SizingPolicyMemoryPerCore)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotOperationMode ¶ added in v1.4.0
type SnapshotOperationMode string
SnapshotOperationMode defines the kind of the clone operation. * `DryRun`: DryRun run without any changes. Compatibility shows in status. * `Strict`: Strict clone as is in the snapshot. * `BestEffort`: BestEffort process without deleted external missing dependencies. +kubebuilder:validation:Enum={DryRun,Strict,BestEffort}
const ( SnapshotOperationModeDryRun SnapshotOperationMode = "DryRun" SnapshotOperationModeStrict SnapshotOperationMode = "Strict" SnapshotOperationModeBestEffort SnapshotOperationMode = "BestEffort" )
type SnapshotResourceStatus ¶ added in v1.4.0
type SnapshotResourceStatus struct {
// API version of the resource.
APIVersion string `json:"apiVersion"`
// Name of the resource.
Name string `json:"name"`
// Kind of the resource.
Kind string `json:"kind"`
// Status of the resource.
Status SnapshotResourceStatusPhase `json:"status"`
// Message about the resource.
Message string `json:"message"`
}
SnapshotResourceStatus defines the resource affected by the operation.
func (*SnapshotResourceStatus) DeepCopy ¶ added in v1.4.0
func (in *SnapshotResourceStatus) DeepCopy() *SnapshotResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotResourceStatus.
func (*SnapshotResourceStatus) DeepCopyInto ¶ added in v1.4.0
func (in *SnapshotResourceStatus) DeepCopyInto(out *SnapshotResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotResourceStatusPhase ¶ added in v1.4.0
type SnapshotResourceStatusPhase string
Current phase of the resource: * `InProgress`: The operation for resource is in progress. * `Completed`: The operation for resource has been completed successfully. * `Failed`: The operation for resource failed. For details, refer to the `Message` field. +kubebuilder:validation:Enum={InProgress,Completed,Failed}
const ( SnapshotResourceStatusInProgress SnapshotResourceStatusPhase = "InProgress" SnapshotResourceStatusCompleted SnapshotResourceStatusPhase = "Completed" SnapshotResourceStatusFailed SnapshotResourceStatusPhase = "Failed" )
type StatusSpeed ¶
type StatusSpeed struct {
// Average download speed.
// +kubebuilder:example:="1 Mbps"
Avg string `json:"avg,omitempty"`
// Average download speed in bytes per second.
// +kubebuilder:example:=1012345
AvgBytes string `json:"avgBytes,omitempty"`
// Current download speed.
// +kubebuilder:example:="5 Mbps"
Current string `json:"current,omitempty"`
// Current download speed in bytes per second.
// +kubebuilder:example:=5123456
CurrentBytes string `json:"currentBytes,omitempty"`
}
Image download speed from an external source. Appears only during the `Provisioning` phase.
func (*StatusSpeed) DeepCopy ¶
func (in *StatusSpeed) DeepCopy() *StatusSpeed
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusSpeed.
func (*StatusSpeed) DeepCopyInto ¶
func (in *StatusSpeed) DeepCopyInto(out *StatusSpeed)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageType ¶
type StorageType string
Storage type to keep the image for the current virtualization setup.
* `ContainerRegistry`: Use the DVCR container registry. In this case, images are downloaded to a container and then to DVCR (shipped with the virtualization module). * `PersistentVolumeClaim`: Use a PVC. * `Kubernetes`: A deprecated storage type. Not recommended for use and may be removed in future versions. Use `PersistentVolumeClaim` instead. +kubebuilder:validation:Enum:={ContainerRegistry,Kubernetes,PersistentVolumeClaim}
const ( StorageContainerRegistry StorageType = "ContainerRegistry" StoragePersistentVolumeClaim StorageType = "PersistentVolumeClaim" // TODO: remove storage type Kubernetes in 2025 StorageKubernetes StorageType = "Kubernetes" )
type SysprepRef ¶
type SysprepRef struct {
// The kind of existing Windows sysprep automation resource.
// The following options are supported:
// - Secret
// +kubebuilder:validation:Enum:={Secret}
// +kubebuilder:default:="Secret"
Kind SysprepRefKind `json:"kind,omitempty"`
Name string `json:"name"`
}
SysprepRef is reference to an existing Windows sysprep automation. Resource structure for the SysprepRef type: * `.data.autounattend.xml`. * `.data.unattend.xml`.
func (*SysprepRef) DeepCopy ¶
func (in *SysprepRef) DeepCopy() *SysprepRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SysprepRef.
func (*SysprepRef) DeepCopyInto ¶
func (in *SysprepRef) DeepCopyInto(out *SysprepRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SysprepRefKind ¶
type SysprepRefKind string
const (
SysprepRefKindSecret SysprepRefKind = "Secret"
)
type Topology ¶ added in v1.0.0
type Topology struct {
// Current number of cores inside the VM.
CoresPerSocket int `json:"coresPerSocket"`
// Current number of cores inside the VM.
Sockets int `json:"sockets"`
}
Topology defines count of used CPU cores and sockets.
func (*Topology) DeepCopy ¶ added in v1.0.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology.
func (*Topology) DeepCopyInto ¶ added in v1.0.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type USBAddress ¶ added in v1.6.0
type USBAddress struct {
// USB bus number (always 0 for the main USB controller).
Bus int `json:"bus"`
// USB port number on the selected bus.
Port int `json:"port"`
}
USBAddress represents the USB bus address inside the virtual machine.
func (*USBAddress) DeepCopy ¶ added in v1.6.0
func (in *USBAddress) DeepCopy() *USBAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBAddress.
func (*USBAddress) DeepCopyInto ¶ added in v1.6.0
func (in *USBAddress) DeepCopyInto(out *USBAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type USBDevice ¶ added in v1.6.0
type USBDevice struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Status USBDeviceStatus `json:"status,omitempty"`
}
Represents a USB device available for attachment to virtual machines in a given namespace. +genclient +kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: USBDevice, metadata: {name: example-usb}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={usb},singular=usbdevice +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Node",type=string,JSONPath=`.status.nodeName` +kubebuilder:printcolumn:name="VendorID",type=string,JSONPath=`.status.attributes.vendorID`,priority=1 +kubebuilder:printcolumn:name="ProductID",type=string,JSONPath=`.status.attributes.productID`,priority=1 +kubebuilder:printcolumn:name="Bus",type=string,JSONPath=`.status.attributes.bus`,priority=1 +kubebuilder:printcolumn:name="DeviceNumber",type=string,JSONPath=`.status.attributes.deviceNumber`,priority=1 +kubebuilder:printcolumn:name="Manufacturer",type=string,JSONPath=`.status.attributes.manufacturer` +kubebuilder:printcolumn:name="Product",type=string,JSONPath=`.status.attributes.product` +kubebuilder:printcolumn:name="Serial",type=string,JSONPath=`.status.attributes.serial`,priority=1 +kubebuilder:printcolumn:name="Attached",type=string,JSONPath=`.status.conditions[?(@.type=="Attached")].status` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*USBDevice) DeepCopy ¶ added in v1.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBDevice.
func (*USBDevice) DeepCopyInto ¶ added in v1.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*USBDevice) DeepCopyObject ¶ added in v1.6.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type USBDeviceList ¶ added in v1.6.0
type USBDeviceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items provides a list of USBDevices.
Items []USBDevice `json:"items"`
}
USBDeviceList provides the needed parameters for requesting a list of USBDevices from the system. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*USBDeviceList) DeepCopy ¶ added in v1.6.0
func (in *USBDeviceList) DeepCopy() *USBDeviceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBDeviceList.
func (*USBDeviceList) DeepCopyInto ¶ added in v1.6.0
func (in *USBDeviceList) DeepCopyInto(out *USBDeviceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*USBDeviceList) DeepCopyObject ¶ added in v1.6.0
func (in *USBDeviceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type USBDeviceSpecRef ¶ added in v1.6.0
type USBDeviceSpecRef struct {
// The name of USBDevice resource in the same namespace.
Name string `json:"name"`
}
USBDeviceSpecRef references a USB device by name.
func (*USBDeviceSpecRef) DeepCopy ¶ added in v1.6.0
func (in *USBDeviceSpecRef) DeepCopy() *USBDeviceSpecRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBDeviceSpecRef.
func (*USBDeviceSpecRef) DeepCopyInto ¶ added in v1.6.0
func (in *USBDeviceSpecRef) DeepCopyInto(out *USBDeviceSpecRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type USBDeviceStatus ¶ added in v1.6.0
type USBDeviceStatus struct {
// All device attributes obtained through DRA for the device.
Attributes NodeUSBDeviceAttributes `json:"attributes,omitempty"`
// Name of the node where the USB device is located.
NodeName string `json:"nodeName,omitempty"`
// Latest available observations of an object's current state.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
Observed state of `USBDevice`.
func (*USBDeviceStatus) DeepCopy ¶ added in v1.6.0
func (in *USBDeviceStatus) DeepCopy() *USBDeviceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBDeviceStatus.
func (*USBDeviceStatus) DeepCopyInto ¶ added in v1.6.0
func (in *USBDeviceStatus) DeepCopyInto(out *USBDeviceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type USBDeviceStatusRef ¶ added in v1.6.0
type USBDeviceStatusRef struct {
// The name of USBDevice resource.
Name string `json:"name"`
// The USB device is attached to the virtual machine.
Attached bool `json:"attached"`
// USB device is ready to use.
Ready bool `json:"ready"`
// USB address inside the virtual machine.
Address *USBAddress `json:"address,omitempty"`
// USB device is attached via hot plug connection.
Hotplugged bool `json:"hotplugged,omitempty"`
}
USBDeviceStatusRef represents the status of a USB device attached to the virtual machine.
func (*USBDeviceStatusRef) DeepCopy ¶ added in v1.6.0
func (in *USBDeviceStatusRef) DeepCopy() *USBDeviceStatusRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBDeviceStatusRef.
func (*USBDeviceStatusRef) DeepCopyInto ¶ added in v1.6.0
func (in *USBDeviceStatusRef) DeepCopyInto(out *USBDeviceStatusRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserDataRef ¶
type UserDataRef struct {
// The kind of existing cloud-init automation resource.
// The following options are supported:
// - Secret
//
// +kubebuilder:validation:Enum:={Secret}
// +kubebuilder:default:="Secret"
Kind UserDataRefKind `json:"kind,omitempty"`
Name string `json:"name"`
}
UserDataRef is reference to an existing resource with a cloud-init script. Resource structure for userDataRef type: * `.data.userData`.
func (*UserDataRef) DeepCopy ¶
func (in *UserDataRef) DeepCopy() *UserDataRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserDataRef.
func (*UserDataRef) DeepCopyInto ¶
func (in *UserDataRef) DeepCopyInto(out *UserDataRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserDataRefKind ¶
type UserDataRefKind string
const (
UserDataRefKindSecret UserDataRefKind = "Secret"
)
type VMAffinity ¶
type VMAffinity struct {
NodeAffinity *corev1.NodeAffinity `json:"nodeAffinity,omitempty"`
VirtualMachineAndPodAffinity *VirtualMachineAndPodAffinity `json:"virtualMachineAndPodAffinity,omitempty"`
VirtualMachineAndPodAntiAffinity *VirtualMachineAndPodAntiAffinity `json:"virtualMachineAndPodAntiAffinity,omitempty"`
}
VMAffinity [The same](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) as in the pods `spec.affinity` parameter in Kubernetes;
The affinity setting is completely similar to the above documentation, the only difference is in the names of some parameters. In fact, the following analogs are used: * podAffinity -> virtualMachineAndPodAffinity * podAffinityTerm -> virtualMachineAndPodAffinityTerm
func (*VMAffinity) DeepCopy ¶
func (in *VMAffinity) DeepCopy() *VMAffinity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAffinity.
func (*VMAffinity) DeepCopyInto ¶
func (in *VMAffinity) DeepCopyInto(out *VMAffinity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMBDAObjectRef ¶
type VMBDAObjectRef struct {
// Block device type. Available options:
// * `VirtualDisk`: Use VirtualDisk as the disk. This type is always mounted in RW mode.
// * `VirtualImage`: Use VirtualImage as the disk. This type is always mounted in RO mode.
// * `ClusterVirtualImage`: Use ClusterVirtualImage as the disk. This type is always mounted in RO mode.
Kind VMBDAObjectRefKind `json:"kind,omitempty"`
// Name of the block device to attach.
// +kubebuilder:validation:MinLength=1
Name string `json:"name,omitempty"`
}
Block device that will be connected to the VM as a hot-plug disk.
func (*VMBDAObjectRef) DeepCopy ¶
func (in *VMBDAObjectRef) DeepCopy() *VMBDAObjectRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMBDAObjectRef.
func (*VMBDAObjectRef) DeepCopyInto ¶
func (in *VMBDAObjectRef) DeepCopyInto(out *VMBDAObjectRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMBDAObjectRefKind ¶
type VMBDAObjectRefKind string
VMBDAObjectRefKind defines the block device type.
+kubebuilder:validation:Enum={VirtualDisk,VirtualImage,ClusterVirtualImage}
const ( VMBDAObjectRefKindVirtualDisk VMBDAObjectRefKind = "VirtualDisk" VMBDAObjectRefKindVirtualImage VMBDAObjectRefKind = "VirtualImage" VMBDAObjectRefKindClusterVirtualImage VMBDAObjectRefKind = "ClusterVirtualImage" )
type VMOPPhase ¶
type VMOPPhase string
Current phase of the resource: * `Pending`: The operation is queued for execution. * `InProgress`: The operation is in progress. * `Completed`: The operation has been completed successfully. * `Failed`: The operation failed. For details, refer to the `conditions` field and events. * `Terminating`: The operation is being deleted. * `Superseded`: The operation has been superseded by another operation. +kubebuilder:validation:Enum={Pending,InProgress,Completed,Failed,Terminating,Superseded}
type VMOPType ¶
type VMOPType string
Type of the operation to execute on a virtual machine: * `Start`: Start the virtual machine. * `Stop`: Stop the virtual machine. * `Restart`: Restart the virtual machine. * `Migrate`: Migrate the virtual machine to another node where it can run. * `Evict`: Evict the virtual machine to another node where it can run. * `Restore`: Restore the virtual machine from a snapshot. * `Clone`: Clone the virtual machine to a new virtual machine. +kubebuilder:validation:Enum={Restart,Start,Stop,Migrate,Evict,Restore,Clone}
type VMSOPCreateVirtualMachineCustomization ¶ added in v1.4.0
type VMSOPCreateVirtualMachineCustomization struct {
// NamePrefix adds a prefix to resource names during cloning.
// Applied to VirtualMachine, VirtualDisk, VirtualMachineBlockDeviceAttachment, and Secret resources.
NamePrefix string `json:"namePrefix,omitempty"`
// NameSuffix adds a suffix to resource names during cloning.
// Applied to VirtualMachine, VirtualDisk, VirtualMachineBlockDeviceAttachment, and Secret resources.
NameSuffix string `json:"nameSuffix,omitempty"`
}
+kubebuilder:validation:XValidation:rule="!has(self.namePrefix) || (size(self.namePrefix) >= 1 && size(self.namePrefix) <= 59)",message="namePrefix length must be between 1 and 59 characters if set" +kubebuilder:validation:XValidation:rule="!has(self.nameSuffix) || (size(self.nameSuffix) >= 1 && size(self.nameSuffix) <= 59)",message="nameSuffix length must be between 1 and 59 characters if set" VMSOPCreateVirtualMachineCustomization defines customization options for cloning.
func (*VMSOPCreateVirtualMachineCustomization) DeepCopy ¶ added in v1.4.0
func (in *VMSOPCreateVirtualMachineCustomization) DeepCopy() *VMSOPCreateVirtualMachineCustomization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMSOPCreateVirtualMachineCustomization.
func (*VMSOPCreateVirtualMachineCustomization) DeepCopyInto ¶ added in v1.4.0
func (in *VMSOPCreateVirtualMachineCustomization) DeepCopyInto(out *VMSOPCreateVirtualMachineCustomization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMSOPCreateVirtualMachineSpec ¶ added in v1.4.0
type VMSOPCreateVirtualMachineSpec struct {
Mode SnapshotOperationMode `json:"mode"`
// NameReplacement defines rules for renaming resources during cloning.
// +kubebuilder:validation:XValidation:rule="self.all(nr, has(nr.to) && size(nr.to) >= 1 && size(nr.to) <= 59)",message="Each nameReplacement.to must be between 1 and 59 characters"
NameReplacement []NameReplacement `json:"nameReplacement,omitempty"`
// Customization defines customization options for cloning.
Customization *VMSOPCreateVirtualMachineCustomization `json:"customization,omitempty"`
}
+kubebuilder:validation:XValidation:rule="(has(self.customization) && ((has(self.customization.namePrefix) && size(self.customization.namePrefix) > 0) || (has(self.customization.nameSuffix) && size(self.customization.nameSuffix) > 0))) || (has(self.nameReplacement) && size(self.nameReplacement) > 0)",message="At least one of customization.namePrefix, customization.nameSuffix, or nameReplacement must be set" VMSOPCreateVirtualMachineSpec defines the clone operation.
func (*VMSOPCreateVirtualMachineSpec) DeepCopy ¶ added in v1.4.0
func (in *VMSOPCreateVirtualMachineSpec) DeepCopy() *VMSOPCreateVirtualMachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMSOPCreateVirtualMachineSpec.
func (*VMSOPCreateVirtualMachineSpec) DeepCopyInto ¶ added in v1.4.0
func (in *VMSOPCreateVirtualMachineSpec) DeepCopyInto(out *VMSOPCreateVirtualMachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMSOPPhase ¶ added in v1.4.0
type VMSOPPhase string
Current phase of the resource: * `Pending`: The operation is queued for execution. * `InProgress`: The operation is in progress. * `Completed`: The operation has been completed successfully. * `Failed`: The operation failed. For details, refer to the `conditions` field and events. * `Terminating`: The operation is being deleted. +kubebuilder:validation:Enum={Pending,InProgress,Completed,Failed,Terminating}
const ( VMSOPPhasePending VMSOPPhase = "Pending" VMSOPPhaseInProgress VMSOPPhase = "InProgress" VMSOPPhaseCompleted VMSOPPhase = "Completed" VMSOPPhaseFailed VMSOPPhase = "Failed" VMSOPPhaseTerminating VMSOPPhase = "Terminating" )
type VMSOPType ¶ added in v1.4.0
type VMSOPType string
Type of the operation to execute on a virtual machine: * `CreateVirtualMachine`: CreateVirtualMachine the virtual machine to a new virtual machine. +kubebuilder:validation:Enum={CreateVirtualMachine}
const (
VMSOPTypeCreateVirtualMachine VMSOPType = "CreateVirtualMachine"
)
type Versions ¶ added in v1.0.0
type Versions struct {
// Qemu is the version of the qemu hypervisor.
Qemu string `json:"qemu,omitempty"`
// Libvirt is the version of the libvirt.
Libvirt string `json:"libvirt,omitempty"`
}
Versions defines statistics about the hypervisor versions.
func (*Versions) DeepCopy ¶ added in v1.0.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Versions.
func (*Versions) DeepCopyInto ¶ added in v1.0.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDisk ¶
type VirtualDisk struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualDiskSpec `json:"spec"`
Status VirtualDiskStatus `json:"status,omitempty"`
}
The VirtualDisk resource describes the desired virtual machine disk configuration. A VirtualDisk can be mounted statically in the virtual machine by specifying it in the `.spec.blockDeviceRefs` disk list, or mounted on-the-fly using the VirtualMachineBlockDeviceAttachments resource.
Once a VirtualDisk is created, the following fields in `.spec.persistentVolumeClaim` can be changed: `size` and `storageClassName`. All other fields are immutable.
**Note:** The `metadata.name` field must comply with [Kubernetes object naming conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/). +kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualDisk, metadata: {name: example-disk}, spec: {dataSource: {objectRef: {kind: VirtualImage, name: example-image}, type: ObjectRef}, persistentVolumeClaim: {size: 10Gi, storageClassName: standard}}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vd},singular=virtualdisk +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Capacity",type=string,JSONPath=`.status.capacity` +kubebuilder:printcolumn:name="InUse",type=string,JSONPath=`.status.conditions[?(@.type=='InUse')].status`,priority=1 +kubebuilder:printcolumn:name="VirtualMachine",type="string",JSONPath=".status.attachedToVirtualMachines[?(@.mounted==true)].name",description="Name of the virtual machine the disk is attached to." +kubebuilder:printcolumn:name="Progress",type=string,JSONPath=`.status.progress`,priority=1 +kubebuilder:printcolumn:name="StorageClass",type=string,JSONPath=`.status.storageClassName`,priority=1 +kubebuilder:printcolumn:name="TargetPVC",type=string,JSONPath=`.status.target.persistentVolumeClaimName`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualDisk) DeepCopy ¶
func (in *VirtualDisk) DeepCopy() *VirtualDisk
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDisk.
func (*VirtualDisk) DeepCopyInto ¶
func (in *VirtualDisk) DeepCopyInto(out *VirtualDisk)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualDisk) DeepCopyObject ¶
func (in *VirtualDisk) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualDiskContainerImage ¶
type VirtualDiskContainerImage struct {
// Path to the image in the container registry.
// +kubebuilder:example:="registry.example.com/images/slackware:15"
// +kubebuilder:validation:Pattern:=`^(?P<name>(?:(?P<domain>(?:(?:localhost|[\w-]+(?:\.[\w-]+)+)(?::\d+)?)|[\w]+:\d+)/)?(?P<image>[a-z0-9_.-]+(?:/[a-z0-9_.-]+)*))(?::(?P<tag>[\w][\w.-]{0,127}))?(?:@(?P<digest>[A-Za-z][A-Za-z0-9]*(?:[+.-_][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,}))?$`
Image string `json:"image"`
ImagePullSecret ImagePullSecretName `json:"imagePullSecret,omitempty"`
// CA chain in Base64 format to verify the container registry.
// +kubebuilder:example:="YWFhCg=="
CABundle []byte `json:"caBundle,omitempty"`
}
Use an image stored in an external container registry. Only registries with enabled TLS are supported. To provide a custom Certificate Authority (CA) chain, use the `caBundle` field.
func (*VirtualDiskContainerImage) DeepCopy ¶
func (in *VirtualDiskContainerImage) DeepCopy() *VirtualDiskContainerImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskContainerImage.
func (*VirtualDiskContainerImage) DeepCopyInto ¶
func (in *VirtualDiskContainerImage) DeepCopyInto(out *VirtualDiskContainerImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskDataSource ¶
type VirtualDiskDataSource struct {
Type DataSourceType `json:"type,omitempty"`
HTTP *DataSourceHTTP `json:"http,omitempty"`
ContainerImage *VirtualDiskContainerImage `json:"containerImage,omitempty"`
ObjectRef *VirtualDiskObjectRef `json:"objectRef,omitempty"`
Upload *DataSourceUpload `json:"upload,omitempty"`
}
+kubebuilder:validation:XValidation:rule="self.type == 'HTTP' ? has(self.http) && !has(self.containerImage) && !has(self.objectRef) && !has(self.upload) : true",message="HTTP requires http and cannot have ContainerImage, ObjectRef or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'ContainerImage' ? has(self.containerImage) && !has(self.http) && !has(self.objectRef) && !has(self.upload) : true",message="ContainerImage requires containerImage and cannot have HTTP, ObjectRef or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'ObjectRef' ? has(self.objectRef) && !has(self.http) && !has(self.containerImage) && !has(self.upload) : true",message="ObjectRef requires objectRef and cannot have HTTP, ContainerImage or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'Upload' ? !has(self.http) && !has(self.containerImage) && !has(self.objectRef) : true",message="Upload cannot have HTTP, ContainerImage or ObjectRef."
func (*VirtualDiskDataSource) DeepCopy ¶
func (in *VirtualDiskDataSource) DeepCopy() *VirtualDiskDataSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskDataSource.
func (*VirtualDiskDataSource) DeepCopyInto ¶
func (in *VirtualDiskDataSource) DeepCopyInto(out *VirtualDiskDataSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskList ¶
type VirtualDiskList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []VirtualDisk `json:"items"`
}
VirtualDiskList contains a list of VirtualDisks. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualDiskList) DeepCopy ¶
func (in *VirtualDiskList) DeepCopy() *VirtualDiskList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskList.
func (*VirtualDiskList) DeepCopyInto ¶
func (in *VirtualDiskList) DeepCopyInto(out *VirtualDiskList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualDiskList) DeepCopyObject ¶
func (in *VirtualDiskList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualDiskMigrationResult ¶ added in v1.4.0
type VirtualDiskMigrationResult string
VirtualDiskMigrationResult is the result of the VirtualDisk migration. +kubebuilder:validation:Enum=Succeeded;Failed
const ( VirtualDiskMigrationResultSucceeded VirtualDiskMigrationResult = "Succeeded" VirtualDiskMigrationResultFailed VirtualDiskMigrationResult = "Failed" )
type VirtualDiskMigrationState ¶ added in v1.4.0
type VirtualDiskMigrationState struct {
// Source PersistentVolumeClaim name.
SourcePVC string `json:"sourcePVC,omitempty"`
// Target PersistentVolumeClaim name.
TargetPVC string `json:"targetPVC,omitempty"`
Result VirtualDiskMigrationResult `json:"result,omitempty"`
Message string `json:"message,omitempty"`
StartTimestamp metav1.Time `json:"startTimestamp,omitempty"`
EndTimestamp metav1.Time `json:"endTimestamp,omitempty"`
}
func (*VirtualDiskMigrationState) DeepCopy ¶ added in v1.4.0
func (in *VirtualDiskMigrationState) DeepCopy() *VirtualDiskMigrationState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskMigrationState.
func (*VirtualDiskMigrationState) DeepCopyInto ¶ added in v1.4.0
func (in *VirtualDiskMigrationState) DeepCopyInto(out *VirtualDiskMigrationState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskObjectRef ¶
type VirtualDiskObjectRef struct {
// Kind of the existing VirtualImage, ClusterVirtualImage, or VirtualDiskSnapshot resource.
Kind VirtualDiskObjectRefKind `json:"kind"`
// Name of the existing VirtualImage, ClusterVirtualImage, or VirtualDiskSnapshot resource.
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
}
Use an existing VirtualImage, ClusterVirtualImage, or VirtualDiskSnapshot resource to create a disk.
func (*VirtualDiskObjectRef) DeepCopy ¶
func (in *VirtualDiskObjectRef) DeepCopy() *VirtualDiskObjectRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskObjectRef.
func (*VirtualDiskObjectRef) DeepCopyInto ¶
func (in *VirtualDiskObjectRef) DeepCopyInto(out *VirtualDiskObjectRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskObjectRefKind ¶
type VirtualDiskObjectRefKind string
+kubebuilder:validation:Enum:={ClusterVirtualImage,VirtualImage,VirtualDiskSnapshot}
const ( VirtualDiskObjectRefKindVirtualImage VirtualDiskObjectRefKind = "VirtualImage" VirtualDiskObjectRefKindClusterVirtualImage VirtualDiskObjectRefKind = "ClusterVirtualImage" VirtualDiskObjectRefKindVirtualDiskSnapshot VirtualDiskObjectRefKind = "VirtualDiskSnapshot" )
type VirtualDiskPersistentVolumeClaim ¶
type VirtualDiskPersistentVolumeClaim struct {
// StorageClass name required by the claim. For details on using StorageClass for PVC, refer to https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.
//
// When creating disks, the user can specify the required StorageClass. If not specified, the default StorageClass will be used.
//
// The disk features and virtual machine behavior depend on the selected StorageClass.
//
// The `VolumeBindingMode` parameter in the StorageClass affects the disk creation process. The following values are allowed:
// - `Immediate`: The disk will be created and becomes available for use immediately after creation.
// - `WaitForFirstConsumer`: The disk will be created when first used on the node where the virtual machine will be started.
//
// StorageClass supports multiple storage settings:
// - Creating a block device (`Block`) or file system (`FileSystem`).
// - Multiple access (`ReadWriteMany`) or single access (`ReadWriteOnce`). The `ReadWriteMany` disks support multiple access, which enables a "live" migration of virtual machines. In contrast, the `ReadWriteOnce` disks, which can be accessed from only one node, don't have this feature.
//
// For known storage types, Deckhouse automatically determines the most efficient settings when creating disks (by priority, in descending order):
// 1. `Block` + `ReadWriteMany`
// 2. `FileSystem` + `ReadWriteMany`
// 3. `Block` + `ReadWriteOnce`
// 4. `FileSystem` + `ReadWriteOnce`
StorageClass *string `json:"storageClassName,omitempty"`
// Desired size for PVC to store the disk. If the disk is created from an image, the size must be at least as large as the original unpacked image.
//
// This parameter can be omitted if the `.spec.dataSource` section is filled out. In this case, the controller will determine the disk size automatically, based on the size of the extracted image from the source specified in `.spec.dataSource`.
Size *resource.Quantity `json:"size,omitempty"`
}
Settings for creating PVCs to store the disk.
func (*VirtualDiskPersistentVolumeClaim) DeepCopy ¶
func (in *VirtualDiskPersistentVolumeClaim) DeepCopy() *VirtualDiskPersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskPersistentVolumeClaim.
func (*VirtualDiskPersistentVolumeClaim) DeepCopyInto ¶
func (in *VirtualDiskPersistentVolumeClaim) DeepCopyInto(out *VirtualDiskPersistentVolumeClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskReclaim ¶ added in v1.11.1
type VirtualDiskReclaim struct {
// OnScaleDown is Delete (default) or Retain.
//
// +kubebuilder:validation:Enum=Delete;Retain
// +kubebuilder:default=Delete
// +optional
OnScaleDown VirtualDiskReclaimPolicy `json:"onScaleDown,omitempty"`
// Keep is the number of free (Retain) disks always kept warm for fast
// scale-up; these are immune to the ttl. Only meaningful with Retain.
//
// +kubebuilder:validation:Minimum=0
// +kubebuilder:default=0
// +optional
Keep int32 `json:"keep,omitempty"`
// TTL is how long a free disk lives beyond the warm buffer before it is
// garbage-collected. Only meaningful with Retain.
//
// +optional
TTL *metav1.Duration `json:"ttl,omitempty"`
}
VirtualDiskReclaim is the reclaim policy and warm-buffer settings of a disk template.
+kubebuilder:validation:XValidation:rule="self.onScaleDown == 'Retain' || (self.keep == 0 && !has(self.ttl))",message="keep and ttl are only valid with onScaleDown: Retain" +kubebuilder:validation:XValidation:rule="self.keep == 0 || has(self.ttl)",message="keep requires ttl; without ttl free disks are never garbage-collected, so keep would have no effect"
func (*VirtualDiskReclaim) DeepCopy ¶ added in v1.11.1
func (in *VirtualDiskReclaim) DeepCopy() *VirtualDiskReclaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskReclaim.
func (*VirtualDiskReclaim) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualDiskReclaim) DeepCopyInto(out *VirtualDiskReclaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskReclaimPolicy ¶ added in v1.11.1
type VirtualDiskReclaimPolicy string
VirtualDiskReclaimPolicy selects the fate of a per-replica disk on scale-down.
const ( // VirtualDiskReclaimDelete removes the disk together with its replica (owner // is the VirtualMachine). This is the default. VirtualDiskReclaimDelete VirtualDiskReclaimPolicy = "Delete" // VirtualDiskReclaimRetain keeps the disk (owner is the pool); it is reused on // the next scale-up. VirtualDiskReclaimRetain VirtualDiskReclaimPolicy = "Retain" )
type VirtualDiskSnapshot ¶
type VirtualDiskSnapshot struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualDiskSnapshotSpec `json:"spec"`
Status VirtualDiskSnapshotStatus `json:"status,omitempty"`
}
VirtualDiskSnapshot +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualDiskSnapshot) DeepCopy ¶
func (in *VirtualDiskSnapshot) DeepCopy() *VirtualDiskSnapshot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskSnapshot.
func (*VirtualDiskSnapshot) DeepCopyInto ¶
func (in *VirtualDiskSnapshot) DeepCopyInto(out *VirtualDiskSnapshot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualDiskSnapshot) DeepCopyObject ¶
func (in *VirtualDiskSnapshot) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualDiskSnapshotList ¶
type VirtualDiskSnapshotList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []VirtualDiskSnapshot `json:"items"`
}
VirtualDiskSnapshotList contains a list of VirtualDiskSnapshot +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualDiskSnapshotList) DeepCopy ¶
func (in *VirtualDiskSnapshotList) DeepCopy() *VirtualDiskSnapshotList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskSnapshotList.
func (*VirtualDiskSnapshotList) DeepCopyInto ¶
func (in *VirtualDiskSnapshotList) DeepCopyInto(out *VirtualDiskSnapshotList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualDiskSnapshotList) DeepCopyObject ¶
func (in *VirtualDiskSnapshotList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualDiskSnapshotPhase ¶
type VirtualDiskSnapshotPhase string
const ( VirtualDiskSnapshotPhasePending VirtualDiskSnapshotPhase = "Pending" VirtualDiskSnapshotPhaseInProgress VirtualDiskSnapshotPhase = "InProgress" VirtualDiskSnapshotPhaseReady VirtualDiskSnapshotPhase = "Ready" VirtualDiskSnapshotPhaseFailed VirtualDiskSnapshotPhase = "Failed" VirtualDiskSnapshotPhaseTerminating VirtualDiskSnapshotPhase = "Terminating" )
type VirtualDiskSnapshotSpec ¶
type VirtualDiskSnapshotSpec struct {
VirtualDiskName string `json:"virtualDiskName"`
RequiredConsistency bool `json:"requiredConsistency"`
}
func (*VirtualDiskSnapshotSpec) DeepCopy ¶
func (in *VirtualDiskSnapshotSpec) DeepCopy() *VirtualDiskSnapshotSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskSnapshotSpec.
func (*VirtualDiskSnapshotSpec) DeepCopyInto ¶
func (in *VirtualDiskSnapshotSpec) DeepCopyInto(out *VirtualDiskSnapshotSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskSnapshotStatus ¶
type VirtualDiskSnapshotStatus struct {
Phase VirtualDiskSnapshotPhase `json:"phase"`
VolumeSnapshotName string `json:"volumeSnapshotName,omitempty"`
Consistent *bool `json:"consistent,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
func (*VirtualDiskSnapshotStatus) DeepCopy ¶
func (in *VirtualDiskSnapshotStatus) DeepCopy() *VirtualDiskSnapshotStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskSnapshotStatus.
func (*VirtualDiskSnapshotStatus) DeepCopyInto ¶
func (in *VirtualDiskSnapshotStatus) DeepCopyInto(out *VirtualDiskSnapshotStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskSpec ¶
type VirtualDiskSpec struct {
DataSource *VirtualDiskDataSource `json:"dataSource,omitempty"`
PersistentVolumeClaim VirtualDiskPersistentVolumeClaim `json:"persistentVolumeClaim,omitempty"`
}
func (*VirtualDiskSpec) DeepCopy ¶
func (in *VirtualDiskSpec) DeepCopy() *VirtualDiskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskSpec.
func (*VirtualDiskSpec) DeepCopyInto ¶
func (in *VirtualDiskSpec) DeepCopyInto(out *VirtualDiskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskStats ¶
type VirtualDiskStats struct {
// Waiting time for the virtual disk creation.
CreationDuration VirtualDiskStatsCreationDuration `json:"creationDuration,omitempty"`
}
VirtualDisk statistics.
func (*VirtualDiskStats) DeepCopy ¶
func (in *VirtualDiskStats) DeepCopy() *VirtualDiskStats
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskStats.
func (*VirtualDiskStats) DeepCopyInto ¶
func (in *VirtualDiskStats) DeepCopyInto(out *VirtualDiskStats)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskStatsCreationDuration ¶
type VirtualDiskStatsCreationDuration struct {
// Waiting time for dependent resources.
// +nullable
WaitingForDependencies *metav1.Duration `json:"waitingForDependencies,omitempty"`
// Waiting time in the `WaitForFirstConsumer` phase.
// +nullable
WaitingForFirstConsumer *metav1.Duration `json:"waitingForFirstConsumer,omitempty"`
// Duration of the loading into DVCR.
// +nullable
DVCRProvisioning *metav1.Duration `json:"dvcrProvisioning,omitempty"`
// Duration of the resource creation from the moment dependencies are ready until the resource transitions to the Ready state.
// +nullable
TotalProvisioning *metav1.Duration `json:"totalProvisioning,omitempty"`
}
func (*VirtualDiskStatsCreationDuration) DeepCopy ¶
func (in *VirtualDiskStatsCreationDuration) DeepCopy() *VirtualDiskStatsCreationDuration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskStatsCreationDuration.
func (*VirtualDiskStatsCreationDuration) DeepCopyInto ¶
func (in *VirtualDiskStatsCreationDuration) DeepCopyInto(out *VirtualDiskStatsCreationDuration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskStatus ¶
type VirtualDiskStatus struct {
DownloadSpeed *StatusSpeed `json:"downloadSpeed,omitempty"`
// Requested PVC capacity in human-readable format.
// +kubebuilder:example:="50G"
Capacity string `json:"capacity,omitempty"`
Target DiskTarget `json:"target,omitempty"`
// Progress of copying an image from a source to PVC. Appears only during the `Provisioning' phase.
Progress string `json:"progress,omitempty"`
// Deprecated. Use `ImageUploadURLs` instead.
UploadCommand string `json:"uploadCommand,omitempty"`
ImageUploadURLs *ImageUploadURLs `json:"imageUploadURLs,omitempty"`
Phase DiskPhase `json:"phase,omitempty"`
// List of VirtualMachines that use the disk.
// +kubebuilder:example:={{name: VM100}}
AttachedToVirtualMachines []AttachedVirtualMachine `json:"attachedToVirtualMachines,omitempty"`
Stats VirtualDiskStats `json:"stats,omitempty"`
SourceUID *types.UID `json:"sourceUID,omitempty"`
// The latest available observations of an object's current state.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Name of the StorageClass used by the PersistentVolumeClaim if `Kubernetes` storage type is used.
StorageClassName string `json:"storageClassName,omitempty"`
// Migration information.
MigrationState VirtualDiskMigrationState `json:"migrationState,omitempty"`
}
func (*VirtualDiskStatus) DeepCopy ¶
func (in *VirtualDiskStatus) DeepCopy() *VirtualDiskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskStatus.
func (*VirtualDiskStatus) DeepCopyInto ¶
func (in *VirtualDiskStatus) DeepCopyInto(out *VirtualDiskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualDiskTemplateSpec ¶ added in v1.11.1
type VirtualDiskTemplateSpec struct {
// Name identifies the disk template within the pool. It is a DNS-1123 label
// (no dots), because it is embedded into VirtualDisk names.
//
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
// +kubebuilder:validation:MaxLength=63
Name string `json:"name"`
// Reclaim controls what happens to the disk when its replica is removed.
//
// +optional
Reclaim VirtualDiskReclaim `json:"reclaim,omitempty"`
// Spec is the desired state of the disk (an ordinary VirtualDiskSpec).
Spec VirtualDiskSpec `json:"spec"`
}
VirtualDiskTemplateSpec describes a per-replica disk.
func (*VirtualDiskTemplateSpec) DeepCopy ¶ added in v1.11.1
func (in *VirtualDiskTemplateSpec) DeepCopy() *VirtualDiskTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskTemplateSpec.
func (*VirtualDiskTemplateSpec) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualDiskTemplateSpec) DeepCopyInto(out *VirtualDiskTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualImage ¶
type VirtualImage struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualImageSpec `json:"spec"`
Status VirtualImageStatus `json:"status,omitempty"`
}
This resource describes a virtual disk image to use as a data source for new VirtualDisk resources or an installation image (iso) that can be mounted into the VirtualMachine resource.
> This resource cannot be modified once it has been created.
With this resource in the cluster, a container image is created and stored in a dedicated Deckhouse Virtualization Container Registry (DVCR) or PVC, with the data filled in from the source.
**Note:** The `metadata.name` field must comply with [Kubernetes object naming conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/). +genclient +kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualImage, metadata: {name: example-image}, spec: {dataSource: {http: {url: 'https://example.com/images/disk.img'}, type: HTTP}, storage: ContainerRegistry}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vi},singular=virtualimage +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="CDROM",type=boolean,JSONPath=`.status.cdrom` +kubebuilder:printcolumn:name="Progress",type=string,JSONPath=`.status.progress` +kubebuilder:printcolumn:name="StoredSize",type=string,JSONPath=`.status.size.stored`,priority=1 +kubebuilder:printcolumn:name="UnpackedSize",type=string,JSONPath=`.status.size.unpacked`,priority=1 +kubebuilder:printcolumn:name="Registry URL",type=string,JSONPath=`.status.target.registryURL`,priority=1 +kubebuilder:printcolumn:name="TargetPVC",type=string,JSONPath=`.status.target.persistentVolumeClaimName`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualImage) DeepCopy ¶
func (in *VirtualImage) DeepCopy() *VirtualImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImage.
func (*VirtualImage) DeepCopyInto ¶
func (in *VirtualImage) DeepCopyInto(out *VirtualImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualImage) DeepCopyObject ¶
func (in *VirtualImage) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualImageContainerImage ¶
type VirtualImageContainerImage struct {
// Path to the image in the container registry.
// +kubebuilder:example:="registry.example.com/images/slackware:15"
// +kubebuilder:validation:Pattern:=`^(?P<name>(?:(?P<domain>(?:(?:localhost|[\w-]+(?:\.[\w-]+)+)(?::\d+)?)|[\w]+:\d+)/)?(?P<image>[a-z0-9_.-]+(?:/[a-z0-9_.-]+)*))(?::(?P<tag>[\w][\w.-]{0,127}))?(?:@(?P<digest>[A-Za-z][A-Za-z0-9]*(?:[+.-_][A-Za-z][A-Za-z0-9]*)*:[0-9a-fA-F]{32,}))?$`
Image string `json:"image"`
ImagePullSecret ImagePullSecretName `json:"imagePullSecret,omitempty"`
// CA chain in Base64 format to verify the container registry.
// +kubebuilder:example:="YWFhCg=="
CABundle []byte `json:"caBundle,omitempty"`
}
Use an image stored in an external container registry. Only registries with enabled TLS protocol are supported. To provide a custom Certificate Authority (CA) chain, use the `caBundle` field.
func (*VirtualImageContainerImage) DeepCopy ¶
func (in *VirtualImageContainerImage) DeepCopy() *VirtualImageContainerImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageContainerImage.
func (*VirtualImageContainerImage) DeepCopyInto ¶
func (in *VirtualImageContainerImage) DeepCopyInto(out *VirtualImageContainerImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualImageDataSource ¶
type VirtualImageDataSource struct {
Type DataSourceType `json:"type,omitempty"`
HTTP *DataSourceHTTP `json:"http,omitempty"`
ContainerImage *VirtualImageContainerImage `json:"containerImage,omitempty"`
ObjectRef *VirtualImageObjectRef `json:"objectRef,omitempty"`
Upload *DataSourceUpload `json:"upload,omitempty"`
}
+kubebuilder:validation:XValidation:rule="self.type == 'HTTP' ? has(self.http) && !has(self.containerImage) && !has(self.objectRef) && !has(self.upload) : true",message="HTTP requires http and cannot have ContainerImage, ObjectRef or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'ContainerImage' ? has(self.containerImage) && !has(self.http) && !has(self.objectRef) && !has(self.upload) : true",message="ContainerImage requires containerImage and cannot have HTTP, ObjectRef or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'ObjectRef' ? has(self.objectRef) && !has(self.http) && !has(self.containerImage) && !has(self.upload) : true",message="ObjectRef requires objectRef and cannot have HTTP, ContainerImage or Upload." +kubebuilder:validation:XValidation:rule="self.type == 'Upload' ? !has(self.http) && !has(self.containerImage) && !has(self.objectRef) : true",message="Upload cannot have HTTP, ContainerImage or ObjectRef."
func (*VirtualImageDataSource) DeepCopy ¶
func (in *VirtualImageDataSource) DeepCopy() *VirtualImageDataSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageDataSource.
func (*VirtualImageDataSource) DeepCopyInto ¶
func (in *VirtualImageDataSource) DeepCopyInto(out *VirtualImageDataSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualImageList ¶
type VirtualImageList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items provides a list of CDIs.
Items []VirtualImage `json:"items"`
}
VirtualImageList provides the needed parameters for requesting a list of VirtualImages from the system. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualImageList) DeepCopy ¶
func (in *VirtualImageList) DeepCopy() *VirtualImageList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageList.
func (*VirtualImageList) DeepCopyInto ¶
func (in *VirtualImageList) DeepCopyInto(out *VirtualImageList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualImageList) DeepCopyObject ¶
func (in *VirtualImageList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualImageObjectRef ¶
type VirtualImageObjectRef struct {
// Kind of an existing VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot resource.
Kind VirtualImageObjectRefKind `json:"kind"`
// Name of an existing VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot resource.
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
}
Use an existing VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot resource to create an image.
func (*VirtualImageObjectRef) DeepCopy ¶
func (in *VirtualImageObjectRef) DeepCopy() *VirtualImageObjectRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageObjectRef.
func (*VirtualImageObjectRef) DeepCopyInto ¶
func (in *VirtualImageObjectRef) DeepCopyInto(out *VirtualImageObjectRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualImageObjectRefKind ¶
type VirtualImageObjectRefKind string
+kubebuilder:validation:Enum:={ClusterVirtualImage,VirtualImage,VirtualDisk,VirtualDiskSnapshot}
const ( VirtualImageObjectRefKindVirtualImage VirtualImageObjectRefKind = "VirtualImage" VirtualImageObjectRefKindClusterVirtualImage VirtualImageObjectRefKind = "ClusterVirtualImage" VirtualImageObjectRefKindVirtualDisk VirtualImageObjectRefKind = "VirtualDisk" VirtualImageObjectRefKindVirtualDiskSnapshot VirtualImageObjectRefKind = "VirtualDiskSnapshot" )
type VirtualImagePersistentVolumeClaim ¶
type VirtualImagePersistentVolumeClaim struct {
// Name of the StorageClass required by the claim. For details on using StorageClass for PVC, refer to — https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.
//
// When creating an image with the `PersistentVolumeClaim` storage type, the user can specify the required StorageClass. If not specified, the default StorageClass will be used.
StorageClass *string `json:"storageClassName,omitempty"`
}
Settings for creating PVCs to store an image with the storage type `PersistentVolumeClaim`.
func (*VirtualImagePersistentVolumeClaim) DeepCopy ¶
func (in *VirtualImagePersistentVolumeClaim) DeepCopy() *VirtualImagePersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImagePersistentVolumeClaim.
func (*VirtualImagePersistentVolumeClaim) DeepCopyInto ¶
func (in *VirtualImagePersistentVolumeClaim) DeepCopyInto(out *VirtualImagePersistentVolumeClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualImageSpec ¶
type VirtualImageSpec struct {
// +kubebuilder:default:=ContainerRegistry
Storage StorageType `json:"storage"`
PersistentVolumeClaim VirtualImagePersistentVolumeClaim `json:"persistentVolumeClaim,omitempty"`
DataSource VirtualImageDataSource `json:"dataSource"`
}
func (*VirtualImageSpec) DeepCopy ¶
func (in *VirtualImageSpec) DeepCopy() *VirtualImageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageSpec.
func (*VirtualImageSpec) DeepCopyInto ¶
func (in *VirtualImageSpec) DeepCopyInto(out *VirtualImageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualImageStatus ¶
type VirtualImageStatus struct {
// Image download speed from an external source. Appears only during the `Provisioning` phase.
DownloadSpeed *StatusSpeed `json:"downloadSpeed,omitempty"`
// Discovered image size data.
Size ImageStatusSize `json:"size,omitempty"`
// Discovered image format.
Format string `json:"format,omitempty"`
// Whether the image is in a format that needs to be mounted as a CD-ROM drive, such as iso and so on.
CDROM bool `json:"cdrom,omitempty"`
// Current status of the ClusterVirtualImage resource:
// * `Pending`: The resource has been created and is on a waiting queue.
// * `Provisioning`: The resource is being created: copying, downloading, or building the image.
// * `WaitForUserUpload`: Waiting for the user to upload the image. The endpoint to upload the image is specified in `.status.uploadCommand`.
// * `Ready`: The resource has been created and is ready to use.
// * `Failed`: There was an error when creating the resource.
// * `Terminating`: The resource is being deleted.
// * `ImageLost`: The image is missing in DVCR. The resource cannot be used.
// * `PVCLost`: The child PVC of the resource is missing. The resource cannot be used.
// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating,ImageLost,PVCLost}
Phase ImagePhase `json:"phase,omitempty"`
// Progress of copying an image from a source to DVCR.
Progress string `json:"progress,omitempty"`
// Deprecated. Use `imageUploadURLs` instead.
UploadCommand string `json:"uploadCommand,omitempty"`
ImageUploadURLs *ImageUploadURLs `json:"imageUploadURLs,omitempty"`
Target VirtualImageStatusTarget `json:"target,omitempty"`
// UID of the source (VirtualImage, ClusterVirtualImage, VirtualDisk or VirtualDiskSnapshot) used when creating the virtual image.
SourceUID *types.UID `json:"sourceUID,omitempty"`
// The latest available observations of an object's current state.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Name of the StorageClass used by the PersistentVolumeClaim if `Kubernetes` storage type is used.
StorageClassName string `json:"storageClassName,omitempty"`
}
func (*VirtualImageStatus) DeepCopy ¶
func (in *VirtualImageStatus) DeepCopy() *VirtualImageStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageStatus.
func (*VirtualImageStatus) DeepCopyInto ¶
func (in *VirtualImageStatus) DeepCopyInto(out *VirtualImageStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualImageStatusTarget ¶
type VirtualImageStatusTarget struct {
// Created image in DVCR.
// +kubebuilder:example:="dvcr.<dvcr-namespace>.svc/vi/<image-namespace>/<image-name>:latest"
RegistryURL string `json:"registryURL,omitempty"`
// Created PersistentVolumeClaim name for the PersistentVolumeClaim storage.
PersistentVolumeClaim string `json:"persistentVolumeClaimName,omitempty"`
}
func (*VirtualImageStatusTarget) DeepCopy ¶
func (in *VirtualImageStatusTarget) DeepCopy() *VirtualImageStatusTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageStatusTarget.
func (*VirtualImageStatusTarget) DeepCopyInto ¶
func (in *VirtualImageStatusTarget) DeepCopyInto(out *VirtualImageStatusTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachine ¶
type VirtualMachine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineSpec `json:"spec"`
Status VirtualMachineStatus `json:"status,omitempty"`
}
VirtualMachine describes the configuration and status of a virtual machine (VM). For a running VM, parameter changes can only be applied after the VM is rebooted, except for the following parameters (they are applied on the fly): - `.metadata.labels`. - `.metadata.annotations`. - `.spec.disruptions.restartApprovalMode`. - `.spec.disruptions.runPolicy`.
+kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualMachine, metadata: {name: example-vm}, spec: {blockDeviceRefs: [{kind: VirtualDisk, name: example-disk}], cpu: {coreFraction: 10%, cores: 1}, memory: {size: 1Gi}, provisioning: {type: UserDataRef, userDataRef: {kind: Secret, name: cloudinit-for-vms}}, virtualMachineClassName: cpu-host-on-worker-nodes}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={all,virtualization},scope=Namespaced,shortName={vm},singular=virtualmachine +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The phase of the virtual machine." +kubebuilder:printcolumn:name="Uptime",type="date",JSONPath=".status.stats.lastStartTime",description="Time since the virtual machine started running." +kubebuilder:printcolumn:name="Cores",priority=1,type="string",JSONPath=".spec.cpu.cores",description="The number of cores of the virtual machine." +kubebuilder:printcolumn:name="CoreFraction",priority=1,type="string",JSONPath=".spec.cpu.coreFraction",description="Virtual machine core fraction. The range of available values is set in the `sizePolicy` parameter of the VirtualMachineClass; if it is not set, use values within the 1–100% range." +kubebuilder:printcolumn:name="Memory",priority=1,type="string",JSONPath=".spec.memory.size",description="The amount of memory of the virtual machine." +kubebuilder:printcolumn:name="Need restart",priority=1,type="string",JSONPath=".status.conditions[?(@.type=='AwaitingRestartToApplyConfiguration')].status",description="A restart of the virtual machine is required." +kubebuilder:printcolumn:name="Agent",priority=1,type="string",JSONPath=".status.conditions[?(@.type=='AgentReady')].status",description="Agent status." +kubebuilder:printcolumn:name="Migratable",priority=1,type="string",JSONPath=".status.conditions[?(@.type=='Migratable')].status",description="Is it possible to migrate a virtual machine." +kubebuilder:printcolumn:name="Node",type="string",JSONPath=".status.nodeName",description="The node where the virtual machine is running." +kubebuilder:printcolumn:name="IPAddress",type="string",JSONPath=".status.ipAddress",description="The IP address of the virtual machine." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time of creation resource." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachine) DeepCopy ¶
func (in *VirtualMachine) DeepCopy() *VirtualMachine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachine.
func (*VirtualMachine) DeepCopyInto ¶
func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachine) DeepCopyObject ¶
func (in *VirtualMachine) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineAndPodAffinity ¶
type VirtualMachineAndPodAffinity struct {
RequiredDuringSchedulingIgnoredDuringExecution []VirtualMachineAndPodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
PreferredDuringSchedulingIgnoredDuringExecution []WeightedVirtualMachineAndPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
func (*VirtualMachineAndPodAffinity) DeepCopy ¶
func (in *VirtualMachineAndPodAffinity) DeepCopy() *VirtualMachineAndPodAffinity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineAndPodAffinity.
func (*VirtualMachineAndPodAffinity) DeepCopyInto ¶
func (in *VirtualMachineAndPodAffinity) DeepCopyInto(out *VirtualMachineAndPodAffinity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineAndPodAffinityTerm ¶
type VirtualMachineAndPodAffinityTerm struct {
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
Namespaces []string `json:"namespaces,omitempty"`
TopologyKey string `json:"topologyKey"`
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
MatchLabelKeys []string `json:"matchLabelKeys,omitempty"`
MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty"`
}
func (*VirtualMachineAndPodAffinityTerm) DeepCopy ¶
func (in *VirtualMachineAndPodAffinityTerm) DeepCopy() *VirtualMachineAndPodAffinityTerm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineAndPodAffinityTerm.
func (*VirtualMachineAndPodAffinityTerm) DeepCopyInto ¶
func (in *VirtualMachineAndPodAffinityTerm) DeepCopyInto(out *VirtualMachineAndPodAffinityTerm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineAndPodAntiAffinity ¶
type VirtualMachineAndPodAntiAffinity struct {
RequiredDuringSchedulingIgnoredDuringExecution []VirtualMachineAndPodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
PreferredDuringSchedulingIgnoredDuringExecution []WeightedVirtualMachineAndPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
}
func (*VirtualMachineAndPodAntiAffinity) DeepCopy ¶
func (in *VirtualMachineAndPodAntiAffinity) DeepCopy() *VirtualMachineAndPodAntiAffinity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineAndPodAntiAffinity.
func (*VirtualMachineAndPodAntiAffinity) DeepCopyInto ¶
func (in *VirtualMachineAndPodAntiAffinity) DeepCopyInto(out *VirtualMachineAndPodAntiAffinity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineBlockDeviceAttachment ¶
type VirtualMachineBlockDeviceAttachment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineBlockDeviceAttachmentSpec `json:"spec"`
Status VirtualMachineBlockDeviceAttachmentStatus `json:"status,omitempty"`
}
VirtualMachineBlockDeviceAttachment provides a hot plug for attaching a disk to a virtual machine. Disks are always attached using the SCSI bus, regardless of the enableParavirtualization setting.
+kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualMachineBlockDeviceAttachment, metadata: {name: attach-example-data-disk}, spec: {blockDeviceRef: {kind: VirtualDisk, name: example-data-disk}, virtualMachineName: example-vm}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vmbda},singular=virtualmachineblockdeviceattachment +kubebuilder:printcolumn:name="PHASE",type="string",JSONPath=".status.phase",description="VirtualMachineBlockDeviceAttachment phase." +kubebuilder:printcolumn:name="BLOCKDEVICE KIND",type=string,JSONPath=`.spec.blockDeviceRef.kind`,priority=1,description="Attached blockdevice kind." +kubebuilder:printcolumn:name="BLOCKDEVICE NAME",type=string,JSONPath=`.spec.blockDeviceRef.name`,priority=1,description="Attached blockdevice name." +kubebuilder:printcolumn:name="VIRTUALMACHINE",type="string",JSONPath=".status.virtualMachineName",description="Name of the virtual machine the disk is attached to." +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="Time of resource creation." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineBlockDeviceAttachment) DeepCopy ¶
func (in *VirtualMachineBlockDeviceAttachment) DeepCopy() *VirtualMachineBlockDeviceAttachment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachment.
func (*VirtualMachineBlockDeviceAttachment) DeepCopyInto ¶
func (in *VirtualMachineBlockDeviceAttachment) DeepCopyInto(out *VirtualMachineBlockDeviceAttachment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineBlockDeviceAttachment) DeepCopyObject ¶
func (in *VirtualMachineBlockDeviceAttachment) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineBlockDeviceAttachmentList ¶
type VirtualMachineBlockDeviceAttachmentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items provides a list of CDIs.
Items []VirtualMachineBlockDeviceAttachment `json:"items"`
}
VirtualMachineBlockDeviceAttachmentList contains a list of VirtualMachineBlockDeviceAttachment resources. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineBlockDeviceAttachmentList) DeepCopy ¶
func (in *VirtualMachineBlockDeviceAttachmentList) DeepCopy() *VirtualMachineBlockDeviceAttachmentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachmentList.
func (*VirtualMachineBlockDeviceAttachmentList) DeepCopyInto ¶
func (in *VirtualMachineBlockDeviceAttachmentList) DeepCopyInto(out *VirtualMachineBlockDeviceAttachmentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineBlockDeviceAttachmentList) DeepCopyObject ¶
func (in *VirtualMachineBlockDeviceAttachmentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineBlockDeviceAttachmentSpec ¶
type VirtualMachineBlockDeviceAttachmentSpec struct {
// Virtual machine name the disk or image should be attached to.
// +kubebuilder:validation:MinLength=1
VirtualMachineName string `json:"virtualMachineName"`
BlockDeviceRef VMBDAObjectRef `json:"blockDeviceRef"`
}
func (*VirtualMachineBlockDeviceAttachmentSpec) DeepCopy ¶
func (in *VirtualMachineBlockDeviceAttachmentSpec) DeepCopy() *VirtualMachineBlockDeviceAttachmentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachmentSpec.
func (*VirtualMachineBlockDeviceAttachmentSpec) DeepCopyInto ¶
func (in *VirtualMachineBlockDeviceAttachmentSpec) DeepCopyInto(out *VirtualMachineBlockDeviceAttachmentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineBlockDeviceAttachmentStatus ¶
type VirtualMachineBlockDeviceAttachmentStatus struct {
Phase BlockDeviceAttachmentPhase `json:"phase,omitempty"`
// Name of the virtual machine the disk is attached to.
VirtualMachineName string `json:"virtualMachineName,omitempty"`
// Contains details of the current API resource state.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
func (*VirtualMachineBlockDeviceAttachmentStatus) DeepCopy ¶
func (in *VirtualMachineBlockDeviceAttachmentStatus) DeepCopy() *VirtualMachineBlockDeviceAttachmentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachmentStatus.
func (*VirtualMachineBlockDeviceAttachmentStatus) DeepCopyInto ¶
func (in *VirtualMachineBlockDeviceAttachmentStatus) DeepCopyInto(out *VirtualMachineBlockDeviceAttachmentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineClass ¶
type VirtualMachineClass struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineClassSpec `json:"spec"`
Status VirtualMachineClassStatus `json:"status,omitempty"`
}
VirtualMachineClass resource describes CPU requirements, node placement, and sizing policy for VM resources. A resource cannot be deleted as long as it is used in one of the VMs.
+kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualMachineClass, metadata: {name: example-class}, spec: {cpu: {type: Host}}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization,backup.deckhouse.io/cluster-config=true} +kubebuilder:subresource:status +kubebuilder:resource:categories={virtualization-cluster},scope=Cluster,shortName={vmc,vmclass},singular=virtualmachineclass +kubebuilder:storageversion +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="VirtualMachineClass phase." +kubebuilder:printcolumn:name="IsDefault",type="string",JSONPath=".metadata.annotations.virtualmachineclass\\.virtualization\\.deckhouse\\.io\\/is-default-class",description="Default class for virtual machines without specified class." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time of resource creation." +kubebuilder:deprecatedversion:warning="v1alpha2.VirtualMachineClass is deprecated; use v1alpha3.VirtualMachineClass" +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineClass) DeepCopy ¶
func (in *VirtualMachineClass) DeepCopy() *VirtualMachineClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClass.
func (*VirtualMachineClass) DeepCopyInto ¶
func (in *VirtualMachineClass) DeepCopyInto(out *VirtualMachineClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineClass) DeepCopyObject ¶
func (in *VirtualMachineClass) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VirtualMachineClass) Hub ¶ added in v1.4.0
func (*VirtualMachineClass) Hub()
type VirtualMachineClassList ¶
type VirtualMachineClassList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items provides a list of VirtualMachineClasses.
Items []VirtualMachineClass `json:"items"`
}
VirtualMachineClassList contains a list of VirtualMachineClasses. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineClassList) DeepCopy ¶
func (in *VirtualMachineClassList) DeepCopy() *VirtualMachineClassList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClassList.
func (*VirtualMachineClassList) DeepCopyInto ¶
func (in *VirtualMachineClassList) DeepCopyInto(out *VirtualMachineClassList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineClassList) DeepCopyObject ¶
func (in *VirtualMachineClassList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineClassPhase ¶
type VirtualMachineClassPhase string
VirtualMachineClassPhase defines the current resource status: * `Pending`: The resource is not ready and waits until the suitable nodes supporting the required CPU model are available. * `Ready`: The resource is ready and available for use. * `Terminating`: The resource is terminating.
+kubebuilder:validation:Enum={Pending,Ready,Terminating}
const ( ClassPhasePending VirtualMachineClassPhase = "Pending" ClassPhaseReady VirtualMachineClassPhase = "Ready" ClassPhaseTerminating VirtualMachineClassPhase = "Terminating" )
type VirtualMachineClassSpec ¶
type VirtualMachineClassSpec struct {
NodeSelector NodeSelector `json:"nodeSelector,omitempty"`
// Tolerations are the same as `spec.tolerations` for [pods](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).
// These tolerations will be merged with the tolerations specified in the VirtualMachine resource. VirtualMachine tolerations have a higher priority.
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// +kubebuilder:validation:Required
CPU CPU `json:"cpu"`
// Policies for allocating computational resources to VMs. Up to 16 policies can be defined.
//
// +kubebuilder:validation:MaxItems=16
SizingPolicies []SizingPolicy `json:"sizingPolicies,omitempty"`
}
func (*VirtualMachineClassSpec) DeepCopy ¶
func (in *VirtualMachineClassSpec) DeepCopy() *VirtualMachineClassSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClassSpec.
func (*VirtualMachineClassSpec) DeepCopyInto ¶
func (in *VirtualMachineClassSpec) DeepCopyInto(out *VirtualMachineClassSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineClassStatus ¶
type VirtualMachineClassStatus struct {
Phase VirtualMachineClassPhase `json:"phase"`
CpuFeatures CpuFeatures `json:"cpuFeatures,omitempty"`
// List of nodes that support this CPU model.
// It is not displayed for the following types: `Host`, `HostPassthrough`.
//
// +kubebuilder:example={node-1, node-2}
AvailableNodes []string `json:"availableNodes,omitempty"`
// Maximum amount of free CPU and memory resources observed among all available nodes.
// +kubebuilder:example={"maxAllocatableResources: {\"cpu\": 1, \"memory\": \"10Gi\"}"}
MaxAllocatableResources corev1.ResourceList `json:"maxAllocatableResources,omitempty"`
// The latest detailed observations of the VirtualMachineClass resource.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
func (*VirtualMachineClassStatus) DeepCopy ¶
func (in *VirtualMachineClassStatus) DeepCopy() *VirtualMachineClassStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClassStatus.
func (*VirtualMachineClassStatus) DeepCopyInto ¶
func (in *VirtualMachineClassStatus) DeepCopyInto(out *VirtualMachineClassStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineIPAddress ¶
type VirtualMachineIPAddress struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineIPAddressSpec `json:"spec,omitempty"`
Status VirtualMachineIPAddressStatus `json:"status,omitempty"`
}
VirtualMachineIPAddress defines IP address for virtual machine. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineIPAddress) DeepCopy ¶
func (in *VirtualMachineIPAddress) DeepCopy() *VirtualMachineIPAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddress.
func (*VirtualMachineIPAddress) DeepCopyInto ¶
func (in *VirtualMachineIPAddress) DeepCopyInto(out *VirtualMachineIPAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineIPAddress) DeepCopyObject ¶
func (in *VirtualMachineIPAddress) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineIPAddressLease ¶
type VirtualMachineIPAddressLease struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineIPAddressLeaseSpec `json:"spec,omitempty"`
Status VirtualMachineIPAddressLeaseStatus `json:"status,omitempty"`
}
VirtualMachineIPAddressLease defines fact of issued lease for `VirtualMachineIPAddress`. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineIPAddressLease) DeepCopy ¶
func (in *VirtualMachineIPAddressLease) DeepCopy() *VirtualMachineIPAddressLease
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLease.
func (*VirtualMachineIPAddressLease) DeepCopyInto ¶
func (in *VirtualMachineIPAddressLease) DeepCopyInto(out *VirtualMachineIPAddressLease)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineIPAddressLease) DeepCopyObject ¶
func (in *VirtualMachineIPAddressLease) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineIPAddressLeaseIpAddressRef ¶
type VirtualMachineIPAddressLeaseIpAddressRef struct {
// The Namespace of the referenced `VirtualMachineIPAddress`.
Namespace string `json:"namespace"`
// The name of the referenced `VirtualMachineIPAddress`.
Name string `json:"name"`
}
func (*VirtualMachineIPAddressLeaseIpAddressRef) DeepCopy ¶
func (in *VirtualMachineIPAddressLeaseIpAddressRef) DeepCopy() *VirtualMachineIPAddressLeaseIpAddressRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseIpAddressRef.
func (*VirtualMachineIPAddressLeaseIpAddressRef) DeepCopyInto ¶
func (in *VirtualMachineIPAddressLeaseIpAddressRef) DeepCopyInto(out *VirtualMachineIPAddressLeaseIpAddressRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineIPAddressLeaseList ¶
type VirtualMachineIPAddressLeaseList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VirtualMachineIPAddressLease `json:"items"`
}
VirtualMachineIPAddressLeaseList contains a list of VirtualMachineIPAddressLease +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineIPAddressLeaseList) DeepCopy ¶
func (in *VirtualMachineIPAddressLeaseList) DeepCopy() *VirtualMachineIPAddressLeaseList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseList.
func (*VirtualMachineIPAddressLeaseList) DeepCopyInto ¶
func (in *VirtualMachineIPAddressLeaseList) DeepCopyInto(out *VirtualMachineIPAddressLeaseList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineIPAddressLeaseList) DeepCopyObject ¶
func (in *VirtualMachineIPAddressLeaseList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineIPAddressLeasePhase ¶
type VirtualMachineIPAddressLeasePhase string
const ( VirtualMachineIPAddressLeasePhaseBound VirtualMachineIPAddressLeasePhase = "Bound" VirtualMachineIPAddressLeasePhaseReleased VirtualMachineIPAddressLeasePhase = "Released" )
type VirtualMachineIPAddressLeaseSpec ¶
type VirtualMachineIPAddressLeaseSpec struct {
// The link to existing `VirtualMachineIPAddress`.
VirtualMachineIPAddressRef *VirtualMachineIPAddressLeaseIpAddressRef `json:"virtualMachineIPAddressRef,omitempty"`
}
VirtualMachineIPAddressLeaseSpec is the desired state of `VirtualMachineIPAddressLease`.
func (*VirtualMachineIPAddressLeaseSpec) DeepCopy ¶
func (in *VirtualMachineIPAddressLeaseSpec) DeepCopy() *VirtualMachineIPAddressLeaseSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseSpec.
func (*VirtualMachineIPAddressLeaseSpec) DeepCopyInto ¶
func (in *VirtualMachineIPAddressLeaseSpec) DeepCopyInto(out *VirtualMachineIPAddressLeaseSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineIPAddressLeaseStatus ¶
type VirtualMachineIPAddressLeaseStatus struct {
// Represents the current state of issued IP address lease.
Phase VirtualMachineIPAddressLeasePhase `json:"phase,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
VirtualMachineIPAddressLeaseStatus is the observed state of `VirtualMachineIPAddressLease`.
func (*VirtualMachineIPAddressLeaseStatus) DeepCopy ¶
func (in *VirtualMachineIPAddressLeaseStatus) DeepCopy() *VirtualMachineIPAddressLeaseStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseStatus.
func (*VirtualMachineIPAddressLeaseStatus) DeepCopyInto ¶
func (in *VirtualMachineIPAddressLeaseStatus) DeepCopyInto(out *VirtualMachineIPAddressLeaseStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineIPAddressList ¶
type VirtualMachineIPAddressList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VirtualMachineIPAddress `json:"items"`
}
VirtualMachineIPAddressList contains a list of VirtualMachineIPAddress +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineIPAddressList) DeepCopy ¶
func (in *VirtualMachineIPAddressList) DeepCopy() *VirtualMachineIPAddressList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressList.
func (*VirtualMachineIPAddressList) DeepCopyInto ¶
func (in *VirtualMachineIPAddressList) DeepCopyInto(out *VirtualMachineIPAddressList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineIPAddressList) DeepCopyObject ¶
func (in *VirtualMachineIPAddressList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineIPAddressPhase ¶
type VirtualMachineIPAddressPhase string
const ( VirtualMachineIPAddressPhasePending VirtualMachineIPAddressPhase = "Pending" VirtualMachineIPAddressPhaseBound VirtualMachineIPAddressPhase = "Bound" VirtualMachineIPAddressPhaseAttached VirtualMachineIPAddressPhase = "Attached" )
type VirtualMachineIPAddressSpec ¶
type VirtualMachineIPAddressSpec struct {
// Type specifies the mode of IP address assignment. Possible values are "Auto" for automatic IP assignment,
// or "Static" for assigning a specific IP address.
Type VirtualMachineIPAddressType `json:"type"`
// StaticIP is the requested IP address. If omitted the next available IP address will be assigned.
StaticIP string `json:"staticIP,omitempty"`
}
VirtualMachineIPAddressSpec is the desired state of `VirtualMachineIPAddress`.
func (*VirtualMachineIPAddressSpec) DeepCopy ¶
func (in *VirtualMachineIPAddressSpec) DeepCopy() *VirtualMachineIPAddressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressSpec.
func (*VirtualMachineIPAddressSpec) DeepCopyInto ¶
func (in *VirtualMachineIPAddressSpec) DeepCopyInto(out *VirtualMachineIPAddressSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineIPAddressStatus ¶
type VirtualMachineIPAddressStatus struct {
// VirtualMachine represents the virtual machine that currently uses this IP address.
// It's the name of the virtual machine instance.
VirtualMachine string `json:"virtualMachineName,omitempty"`
// Address is the assigned IP address allocated to the virtual machine.
Address string `json:"address,omitempty"`
// Phase represents the current state of the IP address.
// It could indicate whether the IP address is in use, available, or in any other defined state.
Phase VirtualMachineIPAddressPhase `json:"phase,omitempty"`
// ObservedGeneration is the most recent generation observed by the controller.
// This is used to identify changes that have been recently observed and handled.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represents the latest available observations of the object's state.
// They provide detailed status and information, such as whether the IP address allocation was successful, in progress, etc.
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
VirtualMachineIPAddressStatus is the observed state of `VirtualMachineIPAddress`.
func (*VirtualMachineIPAddressStatus) DeepCopy ¶
func (in *VirtualMachineIPAddressStatus) DeepCopy() *VirtualMachineIPAddressStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressStatus.
func (*VirtualMachineIPAddressStatus) DeepCopyInto ¶
func (in *VirtualMachineIPAddressStatus) DeepCopyInto(out *VirtualMachineIPAddressStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineIPAddressType ¶
type VirtualMachineIPAddressType string
const ( VirtualMachineIPAddressTypeAuto VirtualMachineIPAddressType = "Auto" VirtualMachineIPAddressTypeStatic VirtualMachineIPAddressType = "Static" )
type VirtualMachineLaunchTimeDuration ¶
type VirtualMachineLaunchTimeDuration struct {
// The waiting time for dependent resources. pending -> starting.
// +nullable
WaitingForDependencies *metav1.Duration `json:"waitingForDependencies,omitempty"`
// The waiting time for the virtual machine to start. starting -> running.
// +nullable
VirtualMachineStarting *metav1.Duration `json:"virtualMachineStarting,omitempty"`
// The waiting time for the guestOsAgent to start. running -> running with guestOSAgent.
// +nullable
GuestOSAgentStarting *metav1.Duration `json:"guestOSAgentStarting,omitempty"`
}
func (*VirtualMachineLaunchTimeDuration) DeepCopy ¶
func (in *VirtualMachineLaunchTimeDuration) DeepCopy() *VirtualMachineLaunchTimeDuration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineLaunchTimeDuration.
func (*VirtualMachineLaunchTimeDuration) DeepCopyInto ¶
func (in *VirtualMachineLaunchTimeDuration) DeepCopyInto(out *VirtualMachineLaunchTimeDuration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineList ¶
type VirtualMachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
// Items provides a list of VirtualMachines
Items []VirtualMachine `json:"items"`
}
VirtualMachineList contains a list of VirtualMachine +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineList) DeepCopy ¶
func (in *VirtualMachineList) DeepCopy() *VirtualMachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineList.
func (*VirtualMachineList) DeepCopyInto ¶
func (in *VirtualMachineList) DeepCopyInto(out *VirtualMachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineList) DeepCopyObject ¶
func (in *VirtualMachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineLocation ¶
type VirtualMachineLocation struct {
// The name of the node on which the VM is currently migrating.
Node string `json:"node,omitempty"`
// The name of the pod where the VM is currently being migrated.
Pod string `json:"pod,omitempty"`
}
func (*VirtualMachineLocation) DeepCopy ¶
func (in *VirtualMachineLocation) DeepCopy() *VirtualMachineLocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineLocation.
func (*VirtualMachineLocation) DeepCopyInto ¶
func (in *VirtualMachineLocation) DeepCopyInto(out *VirtualMachineLocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineMACAddress ¶ added in v1.0.0
type VirtualMachineMACAddress struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineMACAddressSpec `json:"spec,omitempty"`
Status VirtualMachineMACAddressStatus `json:"status,omitempty"`
}
VirtualMachineMACAddress defines MAC address for virtual machine. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineMACAddress) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddress) DeepCopy() *VirtualMachineMACAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddress.
func (*VirtualMachineMACAddress) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddress) DeepCopyInto(out *VirtualMachineMACAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineMACAddress) DeepCopyObject ¶ added in v1.0.0
func (in *VirtualMachineMACAddress) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineMACAddressLease ¶ added in v1.0.0
type VirtualMachineMACAddressLease struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineMACAddressLeaseSpec `json:"spec,omitempty"`
Status VirtualMachineMACAddressLeaseStatus `json:"status,omitempty"`
}
VirtualMachineMACAddressLease defines fact of issued lease for `VirtualMachineMACAddress`. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineMACAddressLease) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLease) DeepCopy() *VirtualMachineMACAddressLease
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressLease.
func (*VirtualMachineMACAddressLease) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLease) DeepCopyInto(out *VirtualMachineMACAddressLease)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineMACAddressLease) DeepCopyObject ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLease) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineMACAddressLeaseList ¶ added in v1.0.0
type VirtualMachineMACAddressLeaseList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VirtualMachineMACAddressLease `json:"items"`
}
VirtualMachineMACAddressLeaseList contains a list of VirtualMachineMACAddressLease +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineMACAddressLeaseList) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseList) DeepCopy() *VirtualMachineMACAddressLeaseList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressLeaseList.
func (*VirtualMachineMACAddressLeaseList) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseList) DeepCopyInto(out *VirtualMachineMACAddressLeaseList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineMACAddressLeaseList) DeepCopyObject ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineMACAddressLeaseMACAddressRef ¶ added in v1.0.0
type VirtualMachineMACAddressLeaseMACAddressRef struct {
// The Namespace of the referenced `VirtualMachineMACAddress`.
Namespace string `json:"namespace"`
// The name of the referenced `VirtualMachineMACAddress`.
Name string `json:"name"`
}
func (*VirtualMachineMACAddressLeaseMACAddressRef) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseMACAddressRef) DeepCopy() *VirtualMachineMACAddressLeaseMACAddressRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressLeaseMACAddressRef.
func (*VirtualMachineMACAddressLeaseMACAddressRef) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseMACAddressRef) DeepCopyInto(out *VirtualMachineMACAddressLeaseMACAddressRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineMACAddressLeasePhase ¶ added in v1.0.0
type VirtualMachineMACAddressLeasePhase string
const (
VirtualMachineMACAddressLeasePhaseBound VirtualMachineMACAddressLeasePhase = "Bound"
)
type VirtualMachineMACAddressLeaseSpec ¶ added in v1.0.0
type VirtualMachineMACAddressLeaseSpec struct {
// The link to existing `VirtualMachineMACAddress`.
VirtualMachineMACAddressRef *VirtualMachineMACAddressLeaseMACAddressRef `json:"virtualMachineMACAddressRef,omitempty"`
}
VirtualMachineMACAddressLeaseSpec is the desired state of `VirtualMachineMACAddressLease`.
func (*VirtualMachineMACAddressLeaseSpec) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseSpec) DeepCopy() *VirtualMachineMACAddressLeaseSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressLeaseSpec.
func (*VirtualMachineMACAddressLeaseSpec) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseSpec) DeepCopyInto(out *VirtualMachineMACAddressLeaseSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineMACAddressLeaseStatus ¶ added in v1.0.0
type VirtualMachineMACAddressLeaseStatus struct {
// Represents the current state of issued MAC address lease.
Phase VirtualMachineMACAddressLeasePhase `json:"phase,omitempty"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
VirtualMachineMACAddressLeaseStatus is the observed state of `VirtualMachineMACAddressLease`.
func (*VirtualMachineMACAddressLeaseStatus) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseStatus) DeepCopy() *VirtualMachineMACAddressLeaseStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressLeaseStatus.
func (*VirtualMachineMACAddressLeaseStatus) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressLeaseStatus) DeepCopyInto(out *VirtualMachineMACAddressLeaseStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineMACAddressList ¶ added in v1.0.0
type VirtualMachineMACAddressList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VirtualMachineMACAddress `json:"items"`
}
VirtualMachineMACAddressList contains a list of VirtualMachineMACAddress +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineMACAddressList) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressList) DeepCopy() *VirtualMachineMACAddressList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressList.
func (*VirtualMachineMACAddressList) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressList) DeepCopyInto(out *VirtualMachineMACAddressList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineMACAddressList) DeepCopyObject ¶ added in v1.0.0
func (in *VirtualMachineMACAddressList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineMACAddressPhase ¶ added in v1.0.0
type VirtualMachineMACAddressPhase string
const ( VirtualMachineMACAddressPhasePending VirtualMachineMACAddressPhase = "Pending" VirtualMachineMACAddressPhaseBound VirtualMachineMACAddressPhase = "Bound" VirtualMachineMACAddressPhaseAttached VirtualMachineMACAddressPhase = "Attached" )
type VirtualMachineMACAddressSpec ¶ added in v1.0.0
type VirtualMachineMACAddressSpec struct {
// MACAddress is the requested MAC address. If omitted - random generate.
Address string `json:"address,omitempty"`
}
VirtualMachineMACAddressSpec is the desired state of `VirtualMachineMACAddress`.
func (*VirtualMachineMACAddressSpec) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressSpec) DeepCopy() *VirtualMachineMACAddressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressSpec.
func (*VirtualMachineMACAddressSpec) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressSpec) DeepCopyInto(out *VirtualMachineMACAddressSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineMACAddressStatus ¶ added in v1.0.0
type VirtualMachineMACAddressStatus struct {
// VirtualMachine represents the virtual machine that currently uses this MAC address.
// It's the name of the virtual machine instance.
VirtualMachine string `json:"virtualMachineName,omitempty"`
// Address is the assigned MAC address allocated to the virtual machine.
Address string `json:"address,omitempty"`
// Phase represents the current state of the MAC address.
// It could indicate whether the MAC address is in use, available, or in any other defined state.
Phase VirtualMachineMACAddressPhase `json:"phase,omitempty"`
// ObservedGeneration is the most recent generation observed by the controller.
// This is used to identify changes that have been recently observed and handled.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represents the latest available observations of the object's state.
// They provide detailed status and information, such as whether the MAC address allocation was successful, in progress, etc.
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
VirtualMachineMACAddressStatus is the observed state of `VirtualMachineMACAddress`.
func (*VirtualMachineMACAddressStatus) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineMACAddressStatus) DeepCopy() *VirtualMachineMACAddressStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMACAddressStatus.
func (*VirtualMachineMACAddressStatus) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineMACAddressStatus) DeepCopyInto(out *VirtualMachineMACAddressStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineMigrationState ¶
type VirtualMachineMigrationState struct {
// Migration start time.
StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"`
// Migration end time.
EndTimestamp *metav1.Time `json:"endTimestamp,omitempty"`
Target VirtualMachineLocation `json:"target,omitempty"`
Source VirtualMachineLocation `json:"source,omitempty"`
Result MigrationResult `json:"result,omitempty"`
}
func (*VirtualMachineMigrationState) DeepCopy ¶
func (in *VirtualMachineMigrationState) DeepCopy() *VirtualMachineMigrationState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMigrationState.
func (*VirtualMachineMigrationState) DeepCopyInto ¶
func (in *VirtualMachineMigrationState) DeepCopyInto(out *VirtualMachineMigrationState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineOperation ¶
type VirtualMachineOperation struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineOperationSpec `json:"spec"`
Status VirtualMachineOperationStatus `json:"status,omitempty"`
}
VirtualMachineOperation enables declarative management of virtual machine state changes. +kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualMachineOperation, metadata: {generateName: restart-example-vm-}, spec: {type: Restart, virtualMachineName: example-vm}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vmop},singular=virtualmachineoperation +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="VirtualMachineOperation phase." +kubebuilder:printcolumn:name="Progress",type="string",JSONPath=".status.progress",description="VirtualMachineOperation progress in percent format." +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="VirtualMachineOperation type." +kubebuilder:printcolumn:name="VirtualMachine",type="string",JSONPath=".spec.virtualMachineName",description="VirtualMachine name." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time of resource creation." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineOperation) DeepCopy ¶
func (in *VirtualMachineOperation) DeepCopy() *VirtualMachineOperation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperation.
func (*VirtualMachineOperation) DeepCopyInto ¶
func (in *VirtualMachineOperation) DeepCopyInto(out *VirtualMachineOperation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineOperation) DeepCopyObject ¶
func (in *VirtualMachineOperation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineOperationCloneCustomization ¶ added in v1.4.0
type VirtualMachineOperationCloneCustomization struct {
// NamePrefix adds a prefix to resource names during cloning.
// Applied to VirtualMachine, VirtualDisk, VirtualMachineBlockDeviceAttachment, and Secret resources.
NamePrefix string `json:"namePrefix,omitempty"`
// NameSuffix adds a suffix to resource names during cloning.
// Applied to VirtualMachine, VirtualDisk, VirtualMachineBlockDeviceAttachment, and Secret resources.
NameSuffix string `json:"nameSuffix,omitempty"`
}
+kubebuilder:validation:XValidation:rule="!has(self.namePrefix) || (size(self.namePrefix) >= 1 && size(self.namePrefix) <= 59)",message="namePrefix length must be between 1 and 59 characters if set" +kubebuilder:validation:XValidation:rule="!has(self.nameSuffix) || (size(self.nameSuffix) >= 1 && size(self.nameSuffix) <= 59)",message="nameSuffix length must be between 1 and 59 characters if set" VirtualMachineOperationCloneCustomization defines customization options for cloning.
func (*VirtualMachineOperationCloneCustomization) DeepCopy ¶ added in v1.4.0
func (in *VirtualMachineOperationCloneCustomization) DeepCopy() *VirtualMachineOperationCloneCustomization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationCloneCustomization.
func (*VirtualMachineOperationCloneCustomization) DeepCopyInto ¶ added in v1.4.0
func (in *VirtualMachineOperationCloneCustomization) DeepCopyInto(out *VirtualMachineOperationCloneCustomization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineOperationCloneSpec ¶ added in v1.4.0
type VirtualMachineOperationCloneSpec struct {
Mode SnapshotOperationMode `json:"mode"`
// NameReplacement defines rules for renaming resources during cloning.
// +kubebuilder:validation:XValidation:rule="self.all(nr, has(nr.to) && size(nr.to) >= 1 && size(nr.to) <= 59)",message="Each nameReplacement.to must be between 1 and 59 characters"
NameReplacement []NameReplacement `json:"nameReplacement,omitempty"`
// Customization defines customization options for cloning.
Customization *VirtualMachineOperationCloneCustomization `json:"customization,omitempty"`
}
+kubebuilder:validation:XValidation:rule="(has(self.customization) && ((has(self.customization.namePrefix) && size(self.customization.namePrefix) > 0) || (has(self.customization.nameSuffix) && size(self.customization.nameSuffix) > 0))) || (has(self.nameReplacement) && size(self.nameReplacement) > 0)",message="At least one of customization.namePrefix, customization.nameSuffix, or nameReplacement must be set" VirtualMachineOperationCloneSpec defines the clone operation.
func (*VirtualMachineOperationCloneSpec) DeepCopy ¶ added in v1.4.0
func (in *VirtualMachineOperationCloneSpec) DeepCopy() *VirtualMachineOperationCloneSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationCloneSpec.
func (*VirtualMachineOperationCloneSpec) DeepCopyInto ¶ added in v1.4.0
func (in *VirtualMachineOperationCloneSpec) DeepCopyInto(out *VirtualMachineOperationCloneSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineOperationList ¶
type VirtualMachineOperationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []VirtualMachineOperation `json:"items"`
}
VirtualMachineOperationList contains a list of VirtualMachineOperation resources. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineOperationList) DeepCopy ¶
func (in *VirtualMachineOperationList) DeepCopy() *VirtualMachineOperationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationList.
func (*VirtualMachineOperationList) DeepCopyInto ¶
func (in *VirtualMachineOperationList) DeepCopyInto(out *VirtualMachineOperationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineOperationList) DeepCopyObject ¶
func (in *VirtualMachineOperationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineOperationMigrateSpec ¶ added in v1.5.1
type VirtualMachineOperationMigrateSpec struct {
// Node selector for scheduling the VM onto a node. Must match the target node's labels.
// [Same](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/) as the Pod `spec.nodeSelector` field in Kubernetes.
//
// > The `nodeSelector` field is not available in the Community Edition.
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}
VirtualMachineOperationMigrateSpec defines the restore operation.
func (*VirtualMachineOperationMigrateSpec) DeepCopy ¶ added in v1.5.1
func (in *VirtualMachineOperationMigrateSpec) DeepCopy() *VirtualMachineOperationMigrateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationMigrateSpec.
func (*VirtualMachineOperationMigrateSpec) DeepCopyInto ¶ added in v1.5.1
func (in *VirtualMachineOperationMigrateSpec) DeepCopyInto(out *VirtualMachineOperationMigrateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineOperationRestoreSpec ¶ added in v1.0.0
type VirtualMachineOperationRestoreSpec struct {
Mode SnapshotOperationMode `json:"mode"`
// VirtualMachineSnapshotName defines the source of the restore operation.
// +kubebuilder:validation:MinLength=1
VirtualMachineSnapshotName string `json:"virtualMachineSnapshotName"`
}
VirtualMachineOperationRestoreSpec defines the restore operation.
func (*VirtualMachineOperationRestoreSpec) DeepCopy ¶ added in v1.0.0
func (in *VirtualMachineOperationRestoreSpec) DeepCopy() *VirtualMachineOperationRestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationRestoreSpec.
func (*VirtualMachineOperationRestoreSpec) DeepCopyInto ¶ added in v1.0.0
func (in *VirtualMachineOperationRestoreSpec) DeepCopyInto(out *VirtualMachineOperationRestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineOperationSpec ¶
type VirtualMachineOperationSpec struct {
Type VMOPType `json:"type"`
// Name of the virtual machine the operation is performed for.
// +kubebuilder:validation:MinLength=1
VirtualMachine string `json:"virtualMachineName"`
// Force execution of an operation.
//
// * Effect on `Restart` and `Stop`: operation performs immediately.
// * Effect on `Evict` and `Migrate`: enable the AutoConverge feature to force migration via CPU throttling if the `PreferSafe` or `PreferForced` policies are used for live migration.
Force *bool `json:"force,omitempty"`
// Restore defines the restore operation.
Restore *VirtualMachineOperationRestoreSpec `json:"restore,omitempty"`
// Clone defines the clone operation.
Clone *VirtualMachineOperationCloneSpec `json:"clone,omitempty"`
// Defines the virtual machine migration operation.
Migrate *VirtualMachineOperationMigrateSpec `json:"migrate,omitempty"`
}
+kubebuilder:validation:XValidation:rule="self == oldSelf",message=".spec is immutable" +kubebuilder:validation:XValidation:rule="self.type == 'Start' ? !has(self.force) || !self.force : true",message="The `Start` operation cannot be performed forcibly." +kubebuilder:validation:XValidation:rule="self.type == 'Restore' ? has(self.restore) : true",message="Restore requires restore field." +kubebuilder:validation:XValidation:rule="self.type == 'Clone' ? has(self.clone) : true",message="Clone requires clone field." +kubebuilder:validation:XValidation:rule="!(has(self.migrate)) || self.type == 'Migrate'",message="spec.migrate can only be set when spec.type is 'Migrate'"
func (*VirtualMachineOperationSpec) DeepCopy ¶
func (in *VirtualMachineOperationSpec) DeepCopy() *VirtualMachineOperationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationSpec.
func (*VirtualMachineOperationSpec) DeepCopyInto ¶
func (in *VirtualMachineOperationSpec) DeepCopyInto(out *VirtualMachineOperationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineOperationStatus ¶
type VirtualMachineOperationStatus struct {
Phase VMOPPhase `json:"phase"`
// Progress reports operation completion percentage for migration-related VMOPs (Evict/Migrate).
// Example: `33%`.
Progress string `json:"progress,omitempty"`
// The latest detailed observations of the VirtualMachineOperation resource.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Resources contains the list of resources that are affected by the snapshot operation.
Resources []SnapshotResourceStatus `json:"resources,omitempty"`
}
func (*VirtualMachineOperationStatus) DeepCopy ¶
func (in *VirtualMachineOperationStatus) DeepCopy() *VirtualMachineOperationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationStatus.
func (*VirtualMachineOperationStatus) DeepCopyInto ¶
func (in *VirtualMachineOperationStatus) DeepCopyInto(out *VirtualMachineOperationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachinePhaseTransitionTimestamp ¶
type VirtualMachinePhaseTransitionTimestamp struct {
Phase MachinePhase `json:"phase,omitempty"`
// PhaseTransitionTimestamp is the timestamp of when the phase change occurred
// +kubebuilder:validation:Format:=date-time
// +nullable
Timestamp metav1.Time `json:"timestamp,omitempty"`
}
VirtualMachinePhaseTransitionTimestamp gives a timestamp in relation to when a phase is set on a vm.
func (*VirtualMachinePhaseTransitionTimestamp) DeepCopy ¶
func (in *VirtualMachinePhaseTransitionTimestamp) DeepCopy() *VirtualMachinePhaseTransitionTimestamp
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePhaseTransitionTimestamp.
func (*VirtualMachinePhaseTransitionTimestamp) DeepCopyInto ¶
func (in *VirtualMachinePhaseTransitionTimestamp) DeepCopyInto(out *VirtualMachinePhaseTransitionTimestamp)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachinePod ¶
type VirtualMachinePod struct {
// Name of virtual machine pod.
Name string `json:"name"`
// Current working pod.
Active bool `json:"active"`
}
func (*VirtualMachinePod) DeepCopy ¶
func (in *VirtualMachinePod) DeepCopy() *VirtualMachinePod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePod.
func (*VirtualMachinePod) DeepCopyInto ¶
func (in *VirtualMachinePod) DeepCopyInto(out *VirtualMachinePod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachinePool ¶ added in v1.11.1
type VirtualMachinePool struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachinePoolSpec `json:"spec"`
Status VirtualMachinePoolStatus `json:"status,omitempty"`
}
VirtualMachinePool declaratively manages a group of identical virtual machines: it keeps the requested number of replicas, scales via the standard `scale` subresource, and reuses "heavy" disks across replica generations.
The resource is available only in paid editions (EE/SE+) and is gated behind the `VirtualMachinePool` module feature gate.
+kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualMachinePool, metadata: {name: example-vms, namespace: workloads}, spec: {replicas: 3, scaleDownPolicy: NewestFirst, virtualMachineTemplate: {spec: {runPolicy: AlwaysOn, virtualMachineClassName: cpu-host-on-worker-nodes, cpu: {cores: 2}, memory: {size: 4Gi}, provisioning: {type: UserDataRef, userDataRef: {kind: Secret, name: cloudinit-for-vms}}, blockDeviceRefs: [{kind: VirtualDisk, name: root}, {kind: VirtualDisk, name: cache}, {kind: ClusterVirtualImage, name: example-tools-iso}]}}, virtualDiskTemplates: [{name: root, reclaim: {onScaleDown: Delete}, spec: {persistentVolumeClaim: {size: 30Gi}, dataSource: {type: ObjectRef, objectRef: {kind: VirtualImage, name: example-image}}}}, {name: cache, reclaim: {onScaleDown: Retain, keep: 5, ttl: 30m}, spec: {persistentVolumeClaim: {size: 50Gi}}}]}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vmpool,vmpools},singular=virtualmachinepool +kubebuilder:storageversion +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="Current number of pool members (including Terminating)." +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Number of members ready to serve." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time of resource creation." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachinePool) DeepCopy ¶ added in v1.11.1
func (in *VirtualMachinePool) DeepCopy() *VirtualMachinePool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePool.
func (*VirtualMachinePool) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualMachinePool) DeepCopyInto(out *VirtualMachinePool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachinePool) DeepCopyObject ¶ added in v1.11.1
func (in *VirtualMachinePool) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachinePoolList ¶ added in v1.11.1
type VirtualMachinePoolList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []VirtualMachinePool `json:"items"`
}
VirtualMachinePoolList contains a list of VirtualMachinePool resources. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachinePoolList) DeepCopy ¶ added in v1.11.1
func (in *VirtualMachinePoolList) DeepCopy() *VirtualMachinePoolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolList.
func (*VirtualMachinePoolList) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualMachinePoolList) DeepCopyInto(out *VirtualMachinePoolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachinePoolList) DeepCopyObject ¶ added in v1.11.1
func (in *VirtualMachinePoolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachinePoolSpec ¶ added in v1.11.1
type VirtualMachinePoolSpec struct {
// Replicas is the desired number of virtual machines in the pool.
//
// The field is written only by its owner — an autoscaler or a human via the
// `scale` subresource, or by the addressed scale-down handler. The controller
// never writes it. Bounds are held by the autoscaler; the hard ceiling is the
// namespace ResourceQuota.
//
// +kubebuilder:validation:Minimum=0
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// ScaleDownPolicy chooses how a replica is picked when the pool is scaled down
// anonymously through the `scale` subresource. It is required and has no
// default, forcing a conscious choice between "any replica may be killed" and
// "only addressed removal is allowed".
//
// - `NewestFirst` — anonymous scale-down is allowed; the youngest replicas
// (least accumulated state) are removed first.
// - `OldestFirst` — anonymous scale-down is allowed; the oldest replicas are
// removed first (faster rotation).
// - `Explicit` — anonymous scale-down through `scale` is rejected by a
// webhook; replicas can be removed only by address. For "busy" workloads
// such as CI runners and VDI.
//
// +kubebuilder:validation:Enum=NewestFirst;OldestFirst;Explicit
ScaleDownPolicy ScaleDownPolicy `json:"scaleDownPolicy"`
// VirtualMachineTemplate is the template every replica is stamped from. Its
// `spec` is an ordinary VirtualMachineSpec, so a replica is no different from a
// manually created virtual machine.
VirtualMachineTemplate VirtualMachineTemplateSpec `json:"virtualMachineTemplate"`
// VirtualDiskTemplates describes each per-replica disk (reclaim policy, size,
// data source). Names are unique within the pool (list-map key) and every
// template must be referenced by a VirtualDisk entry in
// virtualMachineTemplate.spec.blockDeviceRefs, which sets the boot order (see
// the bijection rule on the spec). A disk with reclaim Delete belongs to its
// VirtualMachine and is removed with it; a disk with reclaim Retain belongs to
// the pool, outlives the replica and is reused on a later scale-up.
//
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=16
// +listType=map
// +listMapKey=name
VirtualDiskTemplates []VirtualDiskTemplateSpec `json:"virtualDiskTemplates"`
}
VirtualMachinePoolSpec is the desired state of a VirtualMachinePool.
The disks a replica gets are declared in two places that must stay in sync: virtualDiskTemplates describes each per-replica disk, and the template's blockDeviceRefs references those disks (by name, kind VirtualDisk) to set the boot order and interleave shared images. The three rules below enforce a bijection between them so neither list can carry a dangling entry.
Every virtualDiskTemplates entry must be referenced by a VirtualDisk in the template. +kubebuilder:validation:XValidation:rule="has(self.virtualMachineTemplate.spec) && has(self.virtualMachineTemplate.spec.blockDeviceRefs) && self.virtualDiskTemplates.all(t, self.virtualMachineTemplate.spec.blockDeviceRefs.exists(r, r.kind == 'VirtualDisk' && r.name == t.name))",message="each virtualDiskTemplates entry must be referenced by a VirtualDisk entry in virtualMachineTemplate.spec.blockDeviceRefs" Every VirtualDisk reference in the template must name a virtualDiskTemplates entry. +kubebuilder:validation:XValidation:rule="has(self.virtualMachineTemplate.spec) && has(self.virtualMachineTemplate.spec.blockDeviceRefs) && self.virtualMachineTemplate.spec.blockDeviceRefs.filter(r, r.kind == 'VirtualDisk').all(r, self.virtualDiskTemplates.exists(t, t.name == r.name))",message="each VirtualDisk reference in virtualMachineTemplate.spec.blockDeviceRefs must name a virtualDiskTemplates entry" The reference is one-to-one: no virtualDiskTemplates entry is referenced twice. +kubebuilder:validation:XValidation:rule="has(self.virtualMachineTemplate.spec) && has(self.virtualMachineTemplate.spec.blockDeviceRefs) && self.virtualMachineTemplate.spec.blockDeviceRefs.filter(r, r.kind == 'VirtualDisk').size() == self.virtualDiskTemplates.size()",message="each virtualDiskTemplates entry must be referenced exactly once (no duplicate VirtualDisk references)" A pool tells its replicas apart through provisioning, which the Legacy osType forbids. +kubebuilder:validation:XValidation:rule="!has(self.virtualMachineTemplate.spec) || !has(self.virtualMachineTemplate.spec.osType) || self.virtualMachineTemplate.spec.osType != 'Legacy'",message="The Legacy osType is not supported in a VirtualMachinePool: replicas of such a pool cannot be told apart, because provisioning is unavailable for these operating systems."
func (*VirtualMachinePoolSpec) DeepCopy ¶ added in v1.11.1
func (in *VirtualMachinePoolSpec) DeepCopy() *VirtualMachinePoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolSpec.
func (*VirtualMachinePoolSpec) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualMachinePoolSpec) DeepCopyInto(out *VirtualMachinePoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachinePoolStatus ¶ added in v1.11.1
type VirtualMachinePoolStatus struct {
// ObservedGeneration is the generation of the spec the controller has processed.
//
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Replicas is the number of existing members, including those in Terminating:
// such a machine still occupies resources, so it is real capacity, not a phantom.
//
// +optional
Replicas int32 `json:"replicas,omitempty"`
// ReadyReplicas is the number of members ready to serve (Terminating excluded).
//
// +optional
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// DesiredTemplateHash is the hash of the current virtualMachineTemplate — the
// revision the controller is converging replicas to (cf. updateRevision on a
// StatefulSet).
//
// +optional
DesiredTemplateHash string `json:"desiredTemplateHash,omitempty"`
// UpdatedReplicas is the number of replicas effectively on DesiredTemplateHash
// (fully synced).
//
// +optional
UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
// RestartPendingReplicas is the number of replicas patched to the new template
// whose disruptive part still awaits a restart.
//
// +optional
RestartPendingReplicas int32 `json:"restartPendingReplicas,omitempty"`
// Selector is the label selector the controller publishes for the `scale`
// subresource; HPA/KEDA read it themselves.
//
// +optional
Selector string `json:"selector,omitempty"`
// Conditions describe the current state of the pool.
//
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
VirtualMachinePoolStatus is the observed state of a VirtualMachinePool.
func (*VirtualMachinePoolStatus) DeepCopy ¶ added in v1.11.1
func (in *VirtualMachinePoolStatus) DeepCopy() *VirtualMachinePoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePoolStatus.
func (*VirtualMachinePoolStatus) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualMachinePoolStatus) DeepCopyInto(out *VirtualMachinePoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineSnapshot ¶
type VirtualMachineSnapshot struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineSnapshotSpec `json:"spec"`
Status VirtualMachineSnapshotStatus `json:"status,omitempty"`
}
VirtualMachineSnapshot provides a resource for creating snapshots of virtual machines.
+kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualMachineSnapshot, metadata: {name: example-vm-snapshot}, spec: {keepIPAddress: Never, requiredConsistency: true, virtualMachineName: example-vm}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vmsnapshot,vms},singular=virtualmachinesnapshot +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="VirtualMachineSnapshot phase." +kubebuilder:printcolumn:name="Consistent",type="boolean",JSONPath=".status.consistent",description="VirtualMachineSnapshot consistency." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="VirtualMachineSnapshot age." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineSnapshot) DeepCopy ¶
func (in *VirtualMachineSnapshot) DeepCopy() *VirtualMachineSnapshot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshot.
func (*VirtualMachineSnapshot) DeepCopyInto ¶
func (in *VirtualMachineSnapshot) DeepCopyInto(out *VirtualMachineSnapshot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineSnapshot) DeepCopyObject ¶
func (in *VirtualMachineSnapshot) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineSnapshotList ¶
type VirtualMachineSnapshotList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []VirtualMachineSnapshot `json:"items"`
}
VirtualMachineSnapshotList contains a list of VirtualMachineSnapshot resources. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineSnapshotList) DeepCopy ¶
func (in *VirtualMachineSnapshotList) DeepCopy() *VirtualMachineSnapshotList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotList.
func (*VirtualMachineSnapshotList) DeepCopyInto ¶
func (in *VirtualMachineSnapshotList) DeepCopyInto(out *VirtualMachineSnapshotList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineSnapshotList) DeepCopyObject ¶
func (in *VirtualMachineSnapshotList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineSnapshotOperation ¶ added in v1.4.0
type VirtualMachineSnapshotOperation struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualMachineSnapshotOperationSpec `json:"spec"`
Status VirtualMachineSnapshotOperationStatus `json:"status,omitempty"`
}
VirtualMachineSnapshotOperation enables declarative management of virtual machine snapshot state changes. +kubebuilder:object:root=true +crd-enricher:deckhouse:documentation:examples={apiVersion: virtualization.deckhouse.io/v1alpha2, kind: VirtualMachineSnapshotOperation, metadata: {name: clone-example-vm-from-snapshot}, spec: {createVirtualMachine: {mode: Strict, nameReplacement: [{from: {kind: VirtualMachine, name: example-vm}, to: example-vm-clone}, {from: {kind: VirtualDisk, name: example-disk}, to: example-vm-clone-root}]}, type: CreateVirtualMachine, virtualMachineSnapshotName: example-vm-snapshot}} +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vmsop},singular=virtualmachinesnapshotoperation +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="VirtualMachineSnapshotOperation phase." +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type",description="VirtualMachineSnapshotOperation type." +kubebuilder:printcolumn:name="VirtualMachineSnapshot",type="string",JSONPath=".spec.virtualMachineSnapshotName",description="VirtualMachineSnapshot name." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time of resource creation." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineSnapshotOperation) DeepCopy ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperation) DeepCopy() *VirtualMachineSnapshotOperation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotOperation.
func (*VirtualMachineSnapshotOperation) DeepCopyInto ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperation) DeepCopyInto(out *VirtualMachineSnapshotOperation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineSnapshotOperation) DeepCopyObject ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineSnapshotOperationList ¶ added in v1.4.0
type VirtualMachineSnapshotOperationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []VirtualMachineSnapshotOperation `json:"items"`
}
VirtualMachineSnapshotOperationList contains a list of VirtualMachineSnapshotOperation resources. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VirtualMachineSnapshotOperationList) DeepCopy ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperationList) DeepCopy() *VirtualMachineSnapshotOperationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotOperationList.
func (*VirtualMachineSnapshotOperationList) DeepCopyInto ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperationList) DeepCopyInto(out *VirtualMachineSnapshotOperationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineSnapshotOperationList) DeepCopyObject ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualMachineSnapshotOperationSpec ¶ added in v1.4.0
type VirtualMachineSnapshotOperationSpec struct {
Type VMSOPType `json:"type"`
// Name of the virtual machine snapshot the operation is performed for.
// +kubebuilder:validation:MinLength=1
VirtualMachineSnapshotName string `json:"virtualMachineSnapshotName"`
// CreateVirtualMachine defines the clone operation.
CreateVirtualMachine *VMSOPCreateVirtualMachineSpec `json:"createVirtualMachine,omitempty"`
}
+kubebuilder:validation:XValidation:rule="self == oldSelf",message=".spec is immutable" +kubebuilder:validation:XValidation:rule="self.type == 'CreateVirtualMachineName' ? has(self.createVirtualMachine) : true",message="CreateVirtualMachineName requires clone field."
func (*VirtualMachineSnapshotOperationSpec) DeepCopy ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperationSpec) DeepCopy() *VirtualMachineSnapshotOperationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotOperationSpec.
func (*VirtualMachineSnapshotOperationSpec) DeepCopyInto ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperationSpec) DeepCopyInto(out *VirtualMachineSnapshotOperationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineSnapshotOperationStatus ¶ added in v1.4.0
type VirtualMachineSnapshotOperationStatus struct {
Phase VMSOPPhase `json:"phase"`
// The latest detailed observations of the VirtualMachineSnapshotOperation resource.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Resources contains the list of resources that are affected by the snapshot operation.
Resources []SnapshotResourceStatus `json:"resources,omitempty"`
}
func (*VirtualMachineSnapshotOperationStatus) DeepCopy ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperationStatus) DeepCopy() *VirtualMachineSnapshotOperationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotOperationStatus.
func (*VirtualMachineSnapshotOperationStatus) DeepCopyInto ¶ added in v1.4.0
func (in *VirtualMachineSnapshotOperationStatus) DeepCopyInto(out *VirtualMachineSnapshotOperationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineSnapshotPhase ¶
type VirtualMachineSnapshotPhase string
VirtualMachineSnapshotPhase defines the current status of a resource:
* `Pending`: The resource has been created and is on a waiting queue. * `InProgress`: A virtual machine snapshot is being created. * `Ready`: A snapshot has been created successfully, and now it's available to use. * `Failed`: An error occurred when creating a virtual machine snapshot. * `Terminating`: The resource is being deleted.
+kubebuilder:validation:Enum={Pending,InProgress,Ready,Failed,Terminating}
const ( VirtualMachineSnapshotPhasePending VirtualMachineSnapshotPhase = "Pending" VirtualMachineSnapshotPhaseInProgress VirtualMachineSnapshotPhase = "InProgress" VirtualMachineSnapshotPhaseReady VirtualMachineSnapshotPhase = "Ready" VirtualMachineSnapshotPhaseFailed VirtualMachineSnapshotPhase = "Failed" VirtualMachineSnapshotPhaseTerminating VirtualMachineSnapshotPhase = "Terminating" )
type VirtualMachineSnapshotSpec ¶
type VirtualMachineSnapshotSpec struct {
// Name of the virtual machine to take a snapshot of.
//
// +kubebuilder:validation:MinLength=1
VirtualMachineName string `json:"virtualMachineName"`
// Create a snapshot of a virtual machine only if it is possible to freeze the machine through the agent.
//
// If set to `true`, the virtual machine snapshot will be created only in the following cases:
// - When the virtual machine is powered off.
// - When the virtual machine has an agent, and the freeze operation was successful.
//
// +kubebuilder:default:=true
RequiredConsistency bool `json:"requiredConsistency"`
// +kubebuilder:default:="Always"
KeepIPAddress KeepIPAddress `json:"keepIPAddress"`
}
func (*VirtualMachineSnapshotSpec) DeepCopy ¶
func (in *VirtualMachineSnapshotSpec) DeepCopy() *VirtualMachineSnapshotSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotSpec.
func (*VirtualMachineSnapshotSpec) DeepCopyInto ¶
func (in *VirtualMachineSnapshotSpec) DeepCopyInto(out *VirtualMachineSnapshotSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineSnapshotStatus ¶
type VirtualMachineSnapshotStatus struct {
Phase VirtualMachineSnapshotPhase `json:"phase"`
// Whether a virtual machine snapshot is consistent.
Consistent *bool `json:"consistent,omitempty"`
// Name of the underlying `Secret` created for virtual machine snapshotting.
VirtualMachineSnapshotSecretName string `json:"virtualMachineSnapshotSecretName,omitempty"`
// List of VirtualDiskSnapshot names for the snapshots taken from the virtual disks of the associated virtual machine.
VirtualDiskSnapshotNames []string `json:"virtualDiskSnapshotNames,omitempty"`
// List of snapshot resources.
Resources []ResourceRef `json:"resources,omitempty"`
// The latest detailed observations of the VirtualMachineSnapshot resource.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Resource generation last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
func (*VirtualMachineSnapshotStatus) DeepCopy ¶
func (in *VirtualMachineSnapshotStatus) DeepCopy() *VirtualMachineSnapshotStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotStatus.
func (*VirtualMachineSnapshotStatus) DeepCopyInto ¶
func (in *VirtualMachineSnapshotStatus) DeepCopyInto(out *VirtualMachineSnapshotStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineSpec ¶
type VirtualMachineSpec struct {
// +kubebuilder:default:="AlwaysOnUnlessStoppedManually"
RunPolicy RunPolicy `json:"runPolicy,omitempty"`
// Name for the associated `virtualMachineIPAddress` resource.
// Specified when it is necessary to use a previously created IP address of the VM.
// If not explicitly specified, by default a `virtualMachineIPAddress` resource is created for the VM with a name similar to the VM resource (`.metadata.name`).
VirtualMachineIPAddress string `json:"virtualMachineIPAddressName,omitempty"`
// +crd-enricher:raw:items.properties.maxSkew.description="MaxSkew describes the degree to which VMs may be unevenly distributed.\nWhen `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching VMs in the target topology and the global minimum.\nThe global minimum is the minimum number of matching VMs in an eligible domain, or zero if the number of eligible domains is less than MinDomains.\n\nFor example, in a 3-zone cluster with MaxSkew set to 1 and VMs with the same labelSelector spread as 2/2/1 across zone1, zone2, and zone3, the global minimum is 1:\n- if MaxSkew is 1, the incoming VM can only be scheduled to zone3 (becoming 2/2/2); scheduling it onto zone1 or zone2 would make the ActualSkew (3-1) violate MaxSkew (1);\n- if MaxSkew is 2, the incoming VM can be scheduled onto any zone.\n\nWhen `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it.\nIt is a required field. Default value is 1 and 0 is not allowed."
// +crd-enricher:raw:items.properties.minDomains.description="MinDomains indicates a minimum number of eligible domains.\nWhen the number of eligible domains with matching topology keys is less than minDomains, Topology Spread treats the global minimum as 0, and then the skew is calculated.\nWhen the number of eligible domains with matching topology keys equals or is greater than minDomains, this value has no effect on scheduling.\nAs a result, when the number of eligible domains is less than minDomains, the scheduler will not schedule more than maxSkew VMs to those domains.\nIf the value is nil, the constraint behaves as if MinDomains is equal to 1.\nValid values are integers greater than 0.\nWhen the value is not nil, WhenUnsatisfiable must be DoNotSchedule.\n\nFor example, in a 3-zone cluster with MaxSkew set to 2, MinDomains set to 5, and VMs with the same labelSelector spread as 2/2/2 across zone1, zone2, and zone3, the number of domains is less than 5 (MinDomains), so the global minimum is treated as 0.\nIn this situation, a new VM with the same labelSelector cannot be scheduled, because the computed skew would be 3 (3-0) if the new VM is scheduled to any of the three zones, which violates MaxSkew."
// +crd-enricher:raw:items.properties.whenUnsatisfiable.description="WhenUnsatisfiable indicates how to deal with a VM if it does not satisfy the spread constraint.\n- DoNotSchedule (default) tells the scheduler not to schedule it.\n- ScheduleAnyway tells the scheduler to schedule the VM in any location, but giving higher precedence to topologies that would help reduce the skew.\n\nA constraint is considered Unsatisfiable for an incoming VM if and only if every possible node assignment for that VM would violate MaxSkew on some topology.\nFor example, in a 3-zone cluster with MaxSkew set to 1 and VMs with the same labelSelector spread as 3/1/1 across zone1, zone2, and zone3, if WhenUnsatisfiable is DoNotSchedule, the incoming VM can only be scheduled to zone2 or zone3 (becoming 3/2/1 or 3/1/2), because ActualSkew (2-1) on zone2 or zone3 satisfies MaxSkew (1).\nIn other words, the cluster can still be imbalanced, but the scheduler will not make it more imbalanced.\nIt is a required field."
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
Affinity *VMAffinity `json:"affinity,omitempty"`
// NodeSelector must match a node's labels for the VM to be scheduled on that node.
// [The same](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes//) as in the pods `spec.nodeSelector` parameter in Kubernetes.
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// PriorityClassName [The same](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) as in the pods `spec.priorityClassName` parameter in Kubernetes.
PriorityClassName string `json:"priorityClassName,omitempty"`
// Tolerations define rules to tolerate node taints.
// The same](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) as in the pods `spec.tolerations` parameter in Kubernetes.
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// +kubebuilder:default:={"restartApprovalMode": "Manual"}
Disruptions *Disruptions `json:"disruptions,omitempty"`
// Grace period observed after signalling a VM to stop after which the VM is force terminated.
// +kubebuilder:default:=60
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
// Use the `virtio` bus to connect virtual devices of the VM. Set false to disable `virtio` for this VM.
// Note: To use paravirtualization mode, some operating systems require the appropriate drivers to be installed.
// Note: For the `Legacy` osType set it to false unless the virtio drivers are already installed in the guest OS: these operating systems have no built-in ones and will not boot with virtio devices.
// +kubebuilder:default:=true
EnableParavirtualization *bool `json:"enableParavirtualization,omitempty"`
// +kubebuilder:default:="Generic"
OsType OsType `json:"osType,omitempty"`
// +kubebuilder:default:="BIOS"
Bootloader BootloaderType `json:"bootloader,omitempty"`
// Name of the `VirtualMachineClass` resource describing the requirements for a virtual CPU, memory and the resource allocation policy and node placement policies for virtual machines.
VirtualMachineClassName string `json:"virtualMachineClassName"`
CPU CPUSpec `json:"cpu"`
Memory MemorySpec `json:"memory"`
// List of block devices that can be mounted by disks belonging to the virtual machine.
// The order of booting is determined by the order in the list.
// +kubebuilder:validation:MinItems:=1
// +kubebuilder:validation:MaxItems:=16
BlockDeviceRefs []BlockDeviceSpecRef `json:"blockDeviceRefs"`
Provisioning *Provisioning `json:"provisioning,omitempty"`
// Live migration policy type.
LiveMigrationPolicy LiveMigrationPolicy `json:"liveMigrationPolicy"`
Networks []NetworksSpec `json:"networks,omitempty"`
// List of USB devices to attach to the virtual machine.
// Devices are referenced by name of USBDevice resource in the same namespace.
// +kubebuilder:validation:MaxItems:=8
USBDevices []USBDeviceSpecRef `json:"usbDevices,omitempty"`
// List of GPU devices to attach to the virtual machine.
// Each entry references a GPUClass by name; list order is not significant.
// This feature requires the GPU feature gate.
// +kubebuilder:validation:MaxItems:=16
// +listType=atomic
GPUs []GPUDeviceSpec `json:"gpus,omitempty"`
}
+kubebuilder:validation:XValidation:rule="has(self.osType) && self.osType == 'Legacy' ? !has(self.bootloader) || self.bootloader == 'BIOS' : true",message="The Legacy osType requires the BIOS bootloader." +kubebuilder:validation:XValidation:rule="has(self.osType) && self.osType == 'Legacy' ? !has(self.provisioning) : true",message="The Legacy osType does not support provisioning: such operating systems have no cloud-init or Sysprep support." +kubebuilder:validation:XValidation:rule="has(self.osType) && self.osType == 'Legacy' && has(self.enableParavirtualization) && !self.enableParavirtualization ? size(self.blockDeviceRefs) <= 4 : true",message="The Legacy osType with enableParavirtualization=false supports at most 4 block devices."
func (*VirtualMachineSpec) DeepCopy ¶
func (in *VirtualMachineSpec) DeepCopy() *VirtualMachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSpec.
func (*VirtualMachineSpec) DeepCopyInto ¶
func (in *VirtualMachineSpec) DeepCopyInto(out *VirtualMachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualMachineSpec) IsParavirtualizationEnabled ¶ added in v1.11.1
func (s *VirtualMachineSpec) IsParavirtualizationEnabled() bool
type VirtualMachineStats ¶
type VirtualMachineStats struct {
// The history of phases.
PhasesTransitions []VirtualMachinePhaseTransitionTimestamp `json:"phasesTransitions,omitempty"`
// Launch information.
LaunchTimeDuration VirtualMachineLaunchTimeDuration `json:"launchTimeDuration,omitempty"`
// LastStartTime is the timestamp when the virtual machine last started running.
LastStartTime *metav1.Time `json:"lastStartTime,omitempty"`
}
func (*VirtualMachineStats) DeepCopy ¶
func (in *VirtualMachineStats) DeepCopy() *VirtualMachineStats
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineStats.
func (*VirtualMachineStats) DeepCopyInto ¶
func (in *VirtualMachineStats) DeepCopyInto(out *VirtualMachineStats)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineStatus ¶
type VirtualMachineStatus struct {
Phase MachinePhase `json:"phase"`
// The name of the node on which the VM is currently running.
Node string `json:"nodeName"`
// Name of the VirtualMachineIPAddress resource with an IP address of the VM.
VirtualMachineIPAddress string `json:"virtualMachineIPAddressName"`
// IP address of VM.
IPAddress string `json:"ipAddress"`
// The list of attached block device attachments.
BlockDeviceRefs []BlockDeviceStatusRef `json:"blockDeviceRefs,omitempty"`
GuestOSInfo virtv1.VirtualMachineInstanceGuestOSInfo `json:"guestOSInfo,omitempty"`
// Detailed state of the virtual machine lifecycle.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// VirtualMachine statistics.
Stats *VirtualMachineStats `json:"stats,omitempty"`
// Migration info.
MigrationState *VirtualMachineMigrationState `json:"migrationState,omitempty"`
// Generating a resource that was last processed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Resource values recommended by the Vertical VirtualMachine Autoscaler (EE). Empty
// when autoscaling is off for the VM.
RecommendedResources *RecommendedResourcesStatus `json:"recommendedResources,omitempty"`
// RestartAwaitingChanges holds operations to be manually approved before applying to the virtual machine spec.
RestartAwaitingChanges []apiextensionsv1.JSON `json:"restartAwaitingChanges,omitempty"`
// List of virtual machine pods.
VirtualMachinePods []VirtualMachinePod `json:"virtualMachinePods,omitempty"`
// Hypervisor versions.
Versions Versions `json:"versions,omitempty"`
Resources ResourcesStatus `json:"resources,omitempty"`
Networks []NetworksStatus `json:"networks,omitempty"`
// List of USB devices attached to the virtual machine.
USBDevices []USBDeviceStatusRef `json:"usbDevices,omitempty"`
}
func (*VirtualMachineStatus) DeepCopy ¶
func (in *VirtualMachineStatus) DeepCopy() *VirtualMachineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineStatus.
func (*VirtualMachineStatus) DeepCopyInto ¶
func (in *VirtualMachineStatus) DeepCopyInto(out *VirtualMachineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineTemplateMetadata ¶ added in v1.11.1
type VirtualMachineTemplateMetadata struct {
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}
VirtualMachineTemplateMetadata is the subset of object metadata a pool stamps onto each replica.
func (*VirtualMachineTemplateMetadata) DeepCopy ¶ added in v1.11.1
func (in *VirtualMachineTemplateMetadata) DeepCopy() *VirtualMachineTemplateMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineTemplateMetadata.
func (*VirtualMachineTemplateMetadata) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualMachineTemplateMetadata) DeepCopyInto(out *VirtualMachineTemplateMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualMachineTemplateSpec ¶ added in v1.11.1
type VirtualMachineTemplateSpec struct {
// Metadata applied to every replica. Arbitrary user labels and annotations are
// allowed; the controller adds its managed pool labels on top. A curated
// struct (not the full ObjectMeta) so the CRD schema exposes labels and
// annotations instead of an opaque object.
//
// +optional
Metadata VirtualMachineTemplateMetadata `json:"metadata,omitempty"`
// Spec of the virtual machine that backs each replica.
//
// +optional
Spec VirtualMachineSpec `json:"spec,omitempty"`
}
VirtualMachineTemplateSpec describes the metadata and spec a pool replica is created with.
func (*VirtualMachineTemplateSpec) DeepCopy ¶ added in v1.11.1
func (in *VirtualMachineTemplateSpec) DeepCopy() *VirtualMachineTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineTemplateSpec.
func (*VirtualMachineTemplateSpec) DeepCopyInto ¶ added in v1.11.1
func (in *VirtualMachineTemplateSpec) DeepCopyInto(out *VirtualMachineTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WeightedVirtualMachineAndPodAffinityTerm ¶
type WeightedVirtualMachineAndPodAffinityTerm struct {
// weight associated with matching the corresponding vmAndPodAffinityTerm,
// in the range 1-100.
Weight int32 `json:"weight"`
// Required. A vm affinity term, associated with the corresponding weight.
VirtualMachineAndPodAffinityTerm VirtualMachineAndPodAffinityTerm `json:"virtualMachineAndPodAffinityTerm"`
}
func (*WeightedVirtualMachineAndPodAffinityTerm) DeepCopy ¶
func (in *WeightedVirtualMachineAndPodAffinityTerm) DeepCopy() *WeightedVirtualMachineAndPodAffinityTerm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightedVirtualMachineAndPodAffinityTerm.
func (*WeightedVirtualMachineAndPodAffinityTerm) DeepCopyInto ¶
func (in *WeightedVirtualMachineAndPodAffinityTerm) DeepCopyInto(out *WeightedVirtualMachineAndPodAffinityTerm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files
¶
- block_device.go
- cluster_virtual_image.go
- common_types.go
- data_source.go
- doc.go
- events.go
- finalizers.go
- image_status.go
- node_device_usb.go
- register.go
- snapshot_operation.go
- usb_device.go
- virtual_disk.go
- virtual_disk_snapshot.go
- virtual_image.go
- virtual_machine.go
- virtual_machine_block_device_attachment.go
- virtual_machine_class.go
- virtual_machine_class_conversion.go
- virtual_machine_ip_address.go
- virtual_machine_ip_address_lease.go
- virtual_machine_mac_address.go
- virtual_machine_mac_address_lease.go
- virtual_machine_operation.go
- virtual_machine_pool.go
- virtual_machine_snapshot.go
- virtual_machine_snapshot_operation.go
- vmaffinity.go
- zz_generated.deepcopy.go