v1alpha2

package
v0.0.0-...-ef97745 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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

+kubebuilder:object:generate=true +groupName=virtualization.deckhouse.io

Index

Constants

View Source
const (
	ClusterVirtualImageKind     = "ClusterVirtualImage"
	ClusterVirtualImageResource = "clustervirtualimages"
)
View Source
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"

	// 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"

	// ReasonErrVMOPFailed is event reason that operation is failed
	ReasonErrVMOPFailed = "VirtualMachineOperationFailed"

	// ReasonVMOPSucceeded is event reason that the operation is successfully completed
	ReasonVMOPSucceeded = "VirtualMachineOperationSucceeded"

	// ReasonVMOPStarted is event reason that the operation is started
	ReasonVMOPStarted = "VirtualMachineOperationStarted"

	// ReasonVMClassInUse is event reason that VMClass is used by virtual machine.
	ReasonVMClassInUse = "VirtualMachineClassInUse"

	// ReasonVDStorageClassWasDeleted is event reason that VDStorageClass was deleted.
	ReasonVDStorageClassWasDeleted = "VirtualDiskStorageClassWasDeleted"
	// ReasonVDStorageClassNotFound is event reason that VDStorageClass not found.
	ReasonVDStorageClassNotFound = "VirtualDiskStorageClassNotFound"
	// ReasonVDSpecChanged is event reason that VDStorageClass is chanded.
	ReasonVDSpecChanged = "VirtualDiskSpecChanged"
	// 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"

	// 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"

	// ReasonDataSourceDiskProvisioningFailed is event reason that DataSource disk provisioning is failed.
	ReasonDataSourceDiskProvisioningFailed = "DataSourceImportDiskProvisioningFailed"
)
View Source
const (
	FinalizerCVIProtection        = "virtualization.deckhouse.io/cvi-protection"
	FinalizerVIProtection         = "virtualization.deckhouse.io/vi-protection"
	FinalizerVDProtection         = "virtualization.deckhouse.io/vd-protection"
	FinalizerKVVMProtection       = "virtualization.deckhouse.io/kvvm-protection"
	FinalizerIPAddressProtection  = "virtualization.deckhouse.io/vmip-protection"
	FinalizerPodProtection        = "virtualization.deckhouse.io/pod-protection"
	FinalizerVDSnapshotProtection = "virtualization.deckhouse.io/vdsnapshot-protection"
	FinalizerVMSnapshotProtection = "virtualization.deckhouse.io/vmsnapshot-protection"

	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"
	FinalizerVMClassCleanup        = "virtualization.deckhouse.io/vmclass-cleanup"
	FinalizerVMBDACleanup          = "virtualization.deckhouse.io/vmbda-cleanup"
)
View Source
const (
	VirtualDiskKind     = "VirtualDisk"
	VirtualDiskResource = "virtualdisks"
)
View Source
const (
	VirtualDiskSnapshotKind     = "VirtualDiskSnapshot"
	VirtualDiskSnapshotResource = "virtualdisksnapshots"
)
View Source
const (
	VirtualImageKind     = "VirtualImage"
	VirtualImageResource = "virtualimages"
)
View Source
const (
	VirtualMachineKind     = "VirtualMachine"
	VirtualMachineResource = "virtualmachines"
)
View Source
const (
	SecretTypeCloudInit corev1.SecretType = "provisioning.virtualization.deckhouse.io/cloud-init"
	SecretTypeSysprep   corev1.SecretType = "provisioning.virtualization.deckhouse.io/sysprep"
)
View Source
const (
	VirtualMachineBlockDeviceAttachmentKind     = "VirtualMachineBlockDeviceAttachment"
	VirtualMachineBlockDeviceAttachmentResource = "virtualmachineblockdeviceattachments"
)
View Source
const (
	VirtualMachineClassKind     = "VirtualMachineClass"
	VirtualMachineClassResource = "virtualmachineclasses"
)
View Source
const (
	VirtualMachineIPAddressKind     = "VirtualMachineIPAddress"
	VirtualMachineIPAddressResource = "virtualmachineipaddresses"
)
View Source
const (
	VirtualMachineIPAddressLeaseKind     = "VirtualMachineIPAddressLease"
	VirtualMachineIPAddressLeaseResource = "virtualmachineipaddresleases"
)
View Source
const (
	VirtualMachineOperationKind     = "VirtualMachineOperation"
	VirtualmachineOperationResource = "virtualmachineoperations"
)
View Source
const (
	VirtualMachineRestoreKind     = "VirtualMachineRestore"
	VirtualMachineRestoreResource = "virtualmachinerestores"
)
View Source
const (
	VirtualMachineSnapshotKind     = "VirtualMachineSnapshot"
	VirtualMachineSnapshotResource = "virtualmachinesnapshots"
)
View Source
const Version = "v1alpha2"

Variables

View Source
var (
	// SchemeBuilder tbd
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme tbd
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var ClusterVirtualImageGVK = schema.GroupVersionKind{Group: SchemeGroupVersion.Group, Version: SchemeGroupVersion.Version, Kind: ClusterVirtualImageKind}

ClusterVirtualImageGVK is group version kind for ClusterVirtualImage

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: core.GroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

VirtualDiskGVK is group version kind for VirtualDisk

VirtualImageGVK is group version kind for VirtualImage

Functions

func GroupVersionResource

func GroupVersionResource(resource string) schema.GroupVersionResource

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

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 string `json:"name,omitempty"`
}

A list of `VirtualMachines` that use the disk

func (*AttachedVirtualMachine) DeepCopy

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 current status of resource: * Pending — the resource has been created and is on a waiting queue. * InProgress — the disk is in the process of being attached. * Attached — the disk is attached to virtual machine. * Failed — there was a problem with attaching the disk. * Terminating — the process of resource deletion is in progress.

+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"`
}

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"`
}

func (*BlockDeviceStatusRef) DeepCopy

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"`
	// The name of CPU model. More information about models [here](https://libvirt.org/formatdomain.html#cpu-model-and-topology)
	//
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:example=IvyBridge
	Model string `json:"model,omitempty"`
	// A list of CPU instructions (features) required when type=Features.
	// More information about features [here](https://libvirt.org/formatdomain.html#cpu-model-and-topology)
	//
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:example={mmx, vmx, sse2}
	Features []string `json:"features,omitempty"`
	// Create CPU model based on an intersection 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

func (in *CPU) DeepCopy() *CPU

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPU.

func (*CPU) DeepCopyInto

func (in *CPU) DeepCopyInto(out *CPU)

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.
	// +kubebuilder:default:="100%"
	// +kubebuilder:validation:Enum:={"5%", "10%", "25%", "50%", "100%"}
	CoreFraction string `json:"coreFraction,omitempty"`
}

CPUSpec specifies the CPU settings for the VM.

func (*CPUSpec) DeepCopy

func (in *CPUSpec) DeepCopy() *CPUSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUSpec.

func (*CPUSpec) DeepCopyInto

func (in *CPUSpec) DeepCopyInto(out *CPUSpec)

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"`
}

CPUStatus defines statistics about the CPU resource usage.

func (*CPUStatus) DeepCopy

func (in *CPUStatus) DeepCopy() *CPUStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUStatus.

func (*CPUStatus) DeepCopyInto

func (in *CPUStatus) DeepCopyInto(out *CPUStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CPUType

type CPUType string

CPUType defines cpu type, the following options are supported: * `Host` - a virtual CPU is used that is as close as possible to the platform node's CPU in terms of instruction set. 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 generations of processors, as their instruction set is different. * `HostPassthrough` - uses the physical CPU of the platform node directly without any modifications. When using this class, the guest VM can only be transferred to a target node that has a CPU that exactly matches the CPU of the source node. * `Discovery` - create a CPU model based on an intersecton CPU features for selected nodes. * `Model` - CPU model name. A CPU model is a named and previously defined set of supported CPU instructions. * `Features` - the required set of supported instructions for the CPU.

+kubebuilder:validation:Enum={Host,HostPassthrough,Discovery,Model,Features}

const (
	CPUTypeHost            CPUType = "Host"
	CPUTypeHostPassthrough CPUType = "HostPassthrough"
	CPUTypeDiscovery       CPUType = "Discovery"
	CPUTypeModel           CPUType = "Model"
	CPUTypeFeatures        CPUType = "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:="78be890d71dde316c412da2ce8332ba47b9ce7a29d573801d2777e01aa20b9b5"
	// +kubebuilder:validation:Pattern="^[0-9a-fA-F]{64}$"
	// +kubebuilder:validation:MinLength:=64
	// +kubebuilder:validation:MaxLength:=64
	SHA256 string `json:"sha256,omitempty"`
}

func (*Checksum) DeepCopy

func (in *Checksum) DeepCopy() *Checksum

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Checksum.

func (*Checksum) DeepCopyInto

func (in *Checksum) DeepCopyInto(out *Checksum)

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 `Virtuals` directly. This resource type is available for all namespaces in the cluster.

> This resource cannot be modified once it has been created.

A container image is created under the hood of this resource, which is stored in a dedicated deckhouse virtualization container registry (DVCR).

+kubebuilder:object:root=true +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization,backup.deckhouse.io/cluster-config=true} +kubebuilder:resource:categories={virtualization},scope=Cluster,shortName={cvi,cvis},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` +kubebuilder:validation:XValidation:rule="self.metadata.name.size() <= 128",message="The name must be no longer than 128 characters." +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 {
	// The container registry address of an image.
	// +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"`
	// The 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 TLS enabled registries are supported. Use caBundle field to provide custom CA chain if needed.

func (*ClusterVirtualImageContainerImage) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageContainerImage.

func (*ClusterVirtualImageContainerImage) DeepCopyInto

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"`
}

An origin of the image. +kubebuilder:validation:XValidation:rule="self.type == 'HTTP' ? has(self.http) && !has(self.containerImage) && !has(self.objectRef) : true",message="HTTP requires http and cannot have ContainerImage or ObjectRef" +kubebuilder:validation:XValidation:rule="self.type == 'ContainerImage' ? has(self.containerImage) && !has(self.http) && !has(self.objectRef) : true",message="ContainerImage requires containerImage and cannot have HTTP or ObjectRef" +kubebuilder:validation:XValidation:rule="self.type == 'ObjectRef' ? has(self.objectRef) && !has(self.http) && !has(self.containerImage) : true",message="ObjectRef requires objectRef and cannot have HTTP or ContainerImage"

func (*ClusterVirtualImageDataSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageDataSource.

func (*ClusterVirtualImageDataSource) DeepCopyInto

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 CDIs
	Items []ClusterVirtualImage `json:"items"`
}

ClusterVirtualImageList provides the needed parameters to do request a list of ClusterVirtualImages from the system. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ClusterVirtualImageList) DeepCopy

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"`
	// A name of existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDisk`.
	Name string `json:"name"`
	// A namespace where `VirtualImage` or `VirtualDisk` is located.
	Namespace string `json:"namespace,omitempty"`
}

Use an existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDisk` to create an image.

+kubebuilder:validation:XValidation:rule="self.kind == 'VirtualImage' || self.kind == 'VirtualDisk' ? has(self.__namespace__) && size(self.__namespace__) > 0 : true",message="The namespace is required for VirtualDisk and VirtualImage" +kubebuilder:validation:XValidation:rule="self.kind == 'VirtualImage' || self.kind == 'VirtualDisk' ? has(self.__namespace__) && size(self.__namespace__) < 64 : true",message="The namespace must be no longer than 63 characters."

func (*ClusterVirtualImageObjectRef) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageObjectRef.

func (*ClusterVirtualImageObjectRef) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterVirtualImageObjectRefKind

type ClusterVirtualImageObjectRefKind string

A kind of existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDisk`. +kubebuilder:validation:Enum:={ClusterVirtualImage,VirtualImage,VirtualDisk}

const (
	ClusterVirtualImageObjectRefKindVirtualImage        ClusterVirtualImageObjectRefKind = "VirtualImage"
	ClusterVirtualImageObjectRefKindClusterVirtualImage ClusterVirtualImageObjectRefKind = "ClusterVirtualImage"
	ClusterVirtualImageObjectRefKindVirtualDisk         ClusterVirtualImageObjectRefKind = "VirtualDisk"
)

type ClusterVirtualImageSpec

type ClusterVirtualImageSpec struct {
	DataSource ClusterVirtualImageDataSource `json:"dataSource"`
}

func (*ClusterVirtualImageSpec) DeepCopy

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 sizes of the image.
	Size ImageStatusSize `json:"size,omitempty"`
	// Discovered format of the image.
	Format string `json:"format,omitempty"`
	// Whether the image is a format that is supposed to be mounted as a cdrom, such as iso and so on.
	CDROM bool `json:"cdrom,omitempty"`
	// Current status of `ClusterVirtualImage` resource:
	// * Pending - The resource has been created and is on a waiting queue.
	// * Provisioning - The process of resource creation (copying/downloading/building 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 is created and ready to use.
	// * Failed - There was a problem when creating a resource.
	// * Terminating - The process of resource deletion is in progress.
	// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating}
	Phase ImagePhase `json:"phase,omitempty"`
	// Progress of copying an image from source to DVCR. Appears only during the `Provisioning' phase.
	Progress string `json:"progress,omitempty"`
	// The UID of the source (`VirtualImage`, `ClusterVirtualImage` or `VirtualDisk`) 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"`
	// The 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"`
}

func (*ClusterVirtualImageStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageStatus.

func (*ClusterVirtualImageStatus) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVirtualImageStatusTarget.

func (*ClusterVirtualImageStatusTarget) DeepCopyInto

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 on the basis of which a universal CPU model will be created.
	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 {
	//  A list of CPU features for this model.
	//
	// +kubebuilder:example={mmx, vmx, sse2}
	Enabled []string `json:"enabled,omitempty"`
	// A 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 for this model. Shown only for types `Features` or `Discovery`.

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 {
	// A checksum of the file, provided by the url, to verify if it was downloaded correctly or wasn't changed. The file should match all specified checksums.
	Checksum *Checksum `json:"checksum,omitempty"`
	// The http url with an image. The following formats are supported:
	// * qcow2
	// * vmdk
	// * vdi
	// * iso
	// * raw
	// these formats can also be compressed with 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"`
	// The CA chain in base64 format to verify the url.
	// +kubebuilder:example:="YWFhCg=="
	CABundle []byte `json:"caBundle,omitempty"`
}

Fill the image with data from some external url. Supported schemas are:

* http * https

For https schema there is an option to skip 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 type of an origin of the image. Options are:

* `HTTP` — create an image from a file published on http/https service at a given url * `ContainerImage` — create the image from image stored in container registry. * `ObjectRef` — fill the disk from another existing resource. * `Upload` — fill the image with data, uploaded by user via the special interface.

+kubebuilder:validation:Enum:={HTTP,ContainerImage,ObjectRef,Upload}

const (
	DataSourceTypeHTTP           DataSourceType = "HTTP"
	DataSourceTypeContainerImage DataSourceType = "ContainerImage"
	DataSourceTypeObjectRef      DataSourceType = "ObjectRef"
	DataSourceTypeUpload         DataSourceType = "Upload"
)

type DiskPhase

type DiskPhase string

Current status of `VirtualDisk` resource: * Pending - The resource has been created and is on a waiting queue. * Provisioning - The process of resource creation (copying/downloading/filling the PVC with data/extending PVC) is in progress. * 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 that uses the disk is scheduled. * Ready - The resource is created and ready to use. * Resizing — The process of resource resizing is in progress. * Failed - There was a problem when creating a resource. * PVCLost - The child PVC of the resource is missing. The resource cannot be used. * Terminating - The process of resource deletion is in progress. +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating,PVCLost,WaitForFirstConsumer,Resizing}

const (
	DiskPending              DiskPhase = "Pending"
	DiskWaitForUserUpload    DiskPhase = "WaitForUserUpload"
	DiskWaitForFirstConsumer DiskPhase = "WaitForFirstConsumer"
	DiskProvisioning         DiskPhase = "Provisioning"
	DiskFailed               DiskPhase = "Failed"
	DiskLost                 DiskPhase = "Lost"
	DiskReady                DiskPhase = "Ready"
	DiskResizing             DiskPhase = "Resizing"
	DiskTerminating          DiskPhase = "Terminating"
)

type DiskTarget

type DiskTarget struct {
	// Created PersistentVolumeClaim name for 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 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 = "PVCLost"
)

type ImagePullSecret

type ImagePullSecret struct {
	// A name of the secret containing registry credentials.
	Name string `json:"name,omitempty"`
	// A 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 {
	// A name of the secret containing 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 save the IP address of the 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 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

type MemorySpec struct {
	Size resource.Quantity `json:"size"`
}

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 {
	// The selector to choose resources for name replacement.
	From NameReplacementFrom `json:"from"`
	// The new resource name.
	To string `json:"to"`
}

NameReplacement represents rule to redefine 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 {
	// The kind of resource to rename.
	Kind string `json:"kind,omitempty"`
	// The current name of resource to rename.
	Name string `json:"name"`
}

NameReplacementFrom represents the 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 NodeSelector

type NodeSelector struct {
	// A map of {key,value} pairs.
	// A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values 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 selects the nodes that are targeted to 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 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. +kubebuilder:validation:Enum={Windows,Generic}

const (
	Windows   OsType = "Windows"
	GenericOs OsType = "Generic"
)

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 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}

const (
	AlwaysOnPolicy                RunPolicy = "AlwaysOn"
	AlwaysOffPolicy               RunPolicy = "AlwaysOff"
	ManualPolicy                  RunPolicy = "Manual"
	AlwaysOnUnlessStoppedManually RunPolicy = "AlwaysOnUnlessStoppedManually"
)

type SizingPolicy

type SizingPolicy struct {
	// Memory sizing policy.
	Memory *SizingPolicyMemory `json:"memory,omitempty"`
	// Allowed values of the `coreFraction` parameter.
	CoreFractions []CoreFractionValue `json:"coreFractions,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.
	Cores *SizingPolicyCores `json:"cores,omitempty"`
}

SizingPolicy define 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 cpu core count.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:example=1
	Min int `json:"min"`
	// Maximum cpu core count.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Maximum=1024
	// +kubebuilder:example=10
	Max int `json:"max"`
	// Cpu cores count discretization step. I.e. min=2, max=10, step=4 allows to set 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. I.e. min=2Gi, max=4Gi, step=1Gi allows to set 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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SizingPolicyMemoryPerCore.

func (*SizingPolicyMemoryPerCore) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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 store the image for current virtualization setup.

* `ContainerRegistry` — use a dedicated deckhouse virtualization container registry (DVCR). In this case, images will be downloaded and injected to a container, then pushed to a DVCR (shipped with the virtualization module). * `PersistentVolumeClaim` - use a Persistent Volume Claim (PVC). * `Kubernetes` - Deprecated: Use of this value is discouraged 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 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 {
	// The type of the block device. Options are:
	// * `VirtualDisk` — use `VirtualDisk` as the disk. This type is always mounted in RW mode.
	Kind VMBDAObjectRefKind `json:"kind,omitempty"`
	// The name of block device to attach.
	Name string `json:"name,omitempty"`
}

A 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 type of the block device.

+kubebuilder:validation:Enum={VirtualDisk}

const (
	VMBDAObjectRefKindVirtualDisk VMBDAObjectRefKind = "VirtualDisk"
)

type VMOPPhase

type VMOPPhase string

Represents the current phase of resource: * Pending - the operation is queued for execution. * InProgress - operation in progress. * Completed - the operation was successful. * Failed - the operation failed. Check conditions and events for more information. * Terminating - the operation is deleted. +kubebuilder:validation:Enum={Pending,InProgress,Completed,Failed,Terminating}

const (
	VMOPPhasePending     VMOPPhase = "Pending"
	VMOPPhaseInProgress  VMOPPhase = "InProgress"
	VMOPPhaseCompleted   VMOPPhase = "Completed"
	VMOPPhaseFailed      VMOPPhase = "Failed"
	VMOPPhaseTerminating VMOPPhase = "Terminating"
)

type VMOPType

type VMOPType string

Type is operation over the virtualmachine: * Start - start the virtualmachine. * Stop - stop the virtualmachine. * Restart - restart the virtualmachine. * Migrate (deprecated) - migrate the virtualmachine. * Evict - evict the virtualmachine. +kubebuilder:validation:Enum={Restart,Start,Stop,Migrate,Evict}

const (
	VMOPTypeRestart VMOPType = "Restart"
	VMOPTypeStart   VMOPType = "Start"
	VMOPTypeStop    VMOPType = "Stop"
	VMOPTypeMigrate VMOPType = "Migrate"
	VMOPTypeEvict   VMOPType = "Evict"
)

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 `VirtualDisk` is created, only the disk size `.spec.persistentVolumeClaim.size` can be changed, all other fields are immutable. +kubebuilder:object:root=true +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:resource:categories={virtualization,all},scope=Namespaced,shortName={vd,vds},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="Progress",type=string,JSONPath=`.status.progress`,priority=1 +kubebuilder:printcolumn:name="StorageClass",type=string,JSONPath=`.spec.persistentVolumeClaim.storageClassName`,priority=1 +kubebuilder:printcolumn:name="TargetPVC",type=string,JSONPath=`.status.target.persistentVolumeClaimName`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:validation:XValidation:rule="self.metadata.name.size() <= 128",message="The name must be no longer than 128 characters." +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 {
	// The container registry address of an image.
	// +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"`
	// The 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 TLS enabled registries are supported. Use caBundle field to provide custom CA chain if needed.

func (*VirtualDiskContainerImage) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskContainerImage.

func (*VirtualDiskContainerImage) DeepCopyInto

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"`
}

+kubebuilder:validation:XValidation:rule="self.type == 'HTTP' ? has(self.http) && !has(self.containerImage) && !has(self.objectRef) : true",message="HTTP requires http and cannot have ContainerImage or ObjectRef" +kubebuilder:validation:XValidation:rule="self.type == 'ContainerImage' ? has(self.containerImage) && !has(self.http) && !has(self.objectRef) : true",message="ContainerImage requires containerImage and cannot have HTTP or ObjectRef" +kubebuilder:validation:XValidation:rule="self.type == 'ObjectRef' ? has(self.objectRef) && !has(self.http) && !has(self.containerImage) : true",message="ObjectRef requires objectRef and cannot have HTTP or ContainerImage"

func (*VirtualDiskDataSource) DeepCopy

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 VirtualDisk +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 VirtualDiskObjectRef

type VirtualDiskObjectRef struct {
	// A kind of existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDiskSnapshot`.
	Kind VirtualDiskObjectRefKind `json:"kind"`
	// A name of existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDiskSnapshot`.
	Name string `json:"name"`
}

Use an existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDiskSnapshot` to create a disk.

func (*VirtualDiskObjectRef) DeepCopy

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 {
	// The name of the StorageClass required by the claim. More info — https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
	//
	// When creating disks, the user can specify the required StorageClass to create the disk, or not explicitly, in which case 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:
	// - `Immediate` - The disk will be created and available for use immediately after creation.
	// - `WaitForFirstConsumer` - The disk will be created only when it is used in a virtual machine. In this case, the disk will be created on the host where the virtual machine will be started.
	//
	// StorageClass can support different storage settings:
	// - Creating a block device (`Block`) or file system (`FileSystem`).
	// - Multiple Access (`ReadWriteMany`) or Single Access (`ReadWriteOnce`). `ReadWriteMany` disks support multiple access, which enables live migration of virtual machines. In contrast, `ReadWriteOnce` disks, which are limited to access from only one host, cannot provide this capability.
	//
	// For known storage types, the platform will independently determine the most effective settings when creating disks (in descending order of priority):
	// 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` block is specified, in which 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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskPersistentVolumeClaim.

func (*VirtualDiskPersistentVolumeClaim) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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

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"`
	VolumeSnapshotClassName string `json:"volumeSnapshotClassName"`
	RequiredConsistency     bool   `json:"requiredConsistency"`
}

func (*VirtualDiskSnapshotSpec) DeepCopy

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskSnapshotStatus.

func (*VirtualDiskSnapshotStatus) DeepCopyInto

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 {
	// The 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 {
	// The waiting time for dependent resources.
	// +nullable
	WaitingForDependencies *metav1.Duration `json:"waitingForDependencies,omitempty"`
	// Duration of the loading into DVCR.
	// +nullable
	DVCRProvisioning *metav1.Duration `json:"dvcrProvisioning,omitempty"`
	// The duration of 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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualDiskStatsCreationDuration.

func (*VirtualDiskStatsCreationDuration) DeepCopyInto

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 capacity of the PVC in human-readable format.
	// +kubebuilder:example:="50G"
	Capacity string     `json:"capacity,omitempty"`
	Target   DiskTarget `json:"target,omitempty"`
	// Progress of copying an image from 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"`
	// A 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"`
	// The generation last processed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// The name of the StorageClass used by the PersistentVolumeClaim if `Kubernetes` storage type used.
	StorageClassName string `json:"storageClassName,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 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 or installation image (iso) that can be used as a data source for new `VirtualDisks` or can be mounted in `Virtuals`. > This resource cannot be modified once it has been created.

A container image is created under the hood of this resource, which is stored in a dedicated deckhouse virtualization container registy (DVCR) or PVC, into which the data from the source is filled. +genclient +kubebuilder:object:root=true +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:resource:categories={virtualization,all},scope=Namespaced,shortName={vi,vis},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` +kubebuilder:validation:XValidation:rule="self.metadata.name.size() <= 128",message="The name must be no longer than 128 characters." +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 {
	// The container registry address of an image.
	// +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"`
	// The 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 TLS enabled registries are supported. Use caBundle field to provide custom CA chain if needed.

func (*VirtualImageContainerImage) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImageContainerImage.

func (*VirtualImageContainerImage) DeepCopyInto

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"`
}

+kubebuilder:validation:XValidation:rule="self.type == 'HTTP' ? has(self.http) && !has(self.containerImage) && !has(self.objectRef) : true",message="HTTP requires http and cannot have ContainerImage or ObjectRef" +kubebuilder:validation:XValidation:rule="self.type == 'ContainerImage' ? has(self.containerImage) && !has(self.http) && !has(self.objectRef) : true",message="ContainerImage requires containerImage and cannot have HTTP or ObjectRef" +kubebuilder:validation:XValidation:rule="self.type == 'ObjectRef' ? has(self.objectRef) && !has(self.http) && !has(self.containerImage) : true",message="ObjectRef requires objectRef and cannot have HTTP or ContainerImage"

func (*VirtualImageDataSource) DeepCopy

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 to do request 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 {
	// A kind of existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDisk`.
	Kind VirtualImageObjectRefKind `json:"kind"`
	// A name of existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDisk`.
	Name string `json:"name"`
}

Use an existing `VirtualImage`, `ClusterVirtualImage` or `VirtualDisk` to create an image.

func (*VirtualImageObjectRef) DeepCopy

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}

const (
	VirtualImageObjectRefKindVirtualImage        VirtualImageObjectRefKind = "VirtualImage"
	VirtualImageObjectRefKindClusterVirtualImage VirtualImageObjectRefKind = "ClusterVirtualImage"
	VirtualImageObjectRefKindVirtualDisk         VirtualImageObjectRefKind = "VirtualDisk"
)

type VirtualImagePersistentVolumeClaim

type VirtualImagePersistentVolumeClaim struct {
	// The name of the StorageClass required by the claim. More info — https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
	//
	// When creating image with storage type 'PersistentVolumeClaim', the user can specify the required StorageClass to create the image, or not explicitly, in which case the default StorageClass will be used.
	StorageClass *string `json:"storageClassName,omitempty"`
}

Settings for creating PVCs to store the image with storage type 'PersistentVolumeClaim'.

func (*VirtualImagePersistentVolumeClaim) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualImagePersistentVolumeClaim.

func (*VirtualImagePersistentVolumeClaim) DeepCopyInto

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 sizes of the image.
	Size ImageStatusSize `json:"size,omitempty"`
	// Discovered format of the image.
	Format string `json:"format,omitempty"`
	// Whether the image is a format that is supposed to be mounted as a cdrom, such as iso and so on.
	CDROM bool `json:"cdrom,omitempty"`
	// Current status of `ClusterVirtualImage` resource:
	// * Pending - The resource has been created and is on a waiting queue.
	// * Provisioning - The process of resource creation (copying/downloading/building 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 is created and ready to use.
	// * Failed - There was a problem when creating a resource.
	// * Terminating - The process of resource deletion is in progress.
	// * PVCLost - The child PVC of the resource is missing. The resource cannot be used.
	// +kubebuilder:validation:Enum:={Pending,Provisioning,WaitForUserUpload,Ready,Failed,Terminating,PVCLost}
	Phase ImagePhase `json:"phase,omitempty"`
	// Progress of copying an image from 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"`
	// The UID of the source (`VirtualImage`, `ClusterVirtualImage` or `VirtualDisk`) 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"`
	// The generation last processed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// The name of the StorageClass used by the PersistentVolumeClaim if `Kubernetes` storage type 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 PersistentVolumeClaim storage.
	PersistentVolumeClaim string `json:"persistentVolumeClaimName,omitempty"`
}

func (*VirtualImageStatusTarget) DeepCopy

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 +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={all,virtualization},scope=Namespaced,shortName={vm,vms},singular=virtualmachine +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The phase of the virtual machine." +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." +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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineAndPodAffinity.

func (*VirtualMachineAndPodAffinity) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineAndPodAffinityTerm.

func (*VirtualMachineAndPodAffinityTerm) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineAndPodAntiAffinity.

func (*VirtualMachineAndPodAntiAffinity) DeepCopyInto

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 connecting a disk to a virtual machine.

+kubebuilder:object:root=true +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={all,virtualization},scope=Namespaced,shortName={vmbda,vmbdas},singular=virtualmachineblockdeviceattachment +kubebuilder:printcolumn:name="PHASE",type="string",JSONPath=".status.phase",description="VirtualMachineBlockDeviceAttachment phase." +kubebuilder:printcolumn:name="VIRTUAL MACHINE NAME",type="string",JSONPath=".status.virtualMachineName",description="The name of the virtual machine to which this disk is attached." +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 (*VirtualMachineBlockDeviceAttachment) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachment.

func (*VirtualMachineBlockDeviceAttachment) DeepCopyInto

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. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineBlockDeviceAttachmentList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachmentList.

func (*VirtualMachineBlockDeviceAttachmentList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VirtualMachineBlockDeviceAttachmentList) DeepCopyObject

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VirtualMachineBlockDeviceAttachmentSpec

type VirtualMachineBlockDeviceAttachmentSpec struct {
	// The name of the virtual machine to which the disk or image should be connected.
	VirtualMachineName string         `json:"virtualMachineName"`
	BlockDeviceRef     VMBDAObjectRef `json:"blockDeviceRef"`
}

func (*VirtualMachineBlockDeviceAttachmentSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachmentSpec.

func (*VirtualMachineBlockDeviceAttachmentSpec) DeepCopyInto

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"`
	// The name of the virtual machine to which this disk is attached.
	VirtualMachineName string `json:"virtualMachineName,omitempty"`
	// Contains details of the current state of this API Resource.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// The generation last processed by the controller
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

func (*VirtualMachineBlockDeviceAttachmentStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineBlockDeviceAttachmentStatus.

func (*VirtualMachineBlockDeviceAttachmentStatus) DeepCopyInto

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 a 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 +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization,backup.deckhouse.io/cluster-config=true} +kubebuilder:subresource:status +kubebuilder:resource:categories={virtualization},scope=Cluster,shortName={vmc,vmcs,vmclass,vmclasses},singular=virtualmachineclass +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="VirtualMachineClass phase." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time of creation resource." +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.

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 VirtualMachineClass +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineClassList) DeepCopy

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 current status of resource: * Pending - resource is not ready, waits until suitable nodes supporting the required CPU model become 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` in the [Pod](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).
	// These tolerations will be merged with tolerations specified in VirtualMachine resource. VirtualMachine tolerations have higher priority.
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// +kubebuilder:validation:Required
	CPU            CPU            `json:"cpu"`
	SizingPolicies []SizingPolicy `json:"sizingPolicies,omitempty"`
}

func (*VirtualMachineClassSpec) DeepCopy

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"`
	// A list of nodes that support this CPU model.
	// It is not displayed for the types: `Host`, `HostPassthrough`
	//
	// +kubebuilder:example={node-1, node-2}
	AvailableNodes []string `json:"availableNodes,omitempty"`
	// The 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"`
	// The generation last processed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

func (*VirtualMachineClassStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineClassStatus.

func (*VirtualMachineClassStatus) DeepCopyInto

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

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLease.

func (*VirtualMachineIPAddressLease) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseIpAddressRef.

func (*VirtualMachineIPAddressLeaseIpAddressRef) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseList.

func (*VirtualMachineIPAddressLeaseList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseSpec.

func (*VirtualMachineIPAddressLeaseSpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressLeaseStatus.

func (*VirtualMachineIPAddressLeaseStatus) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressList.

func (*VirtualMachineIPAddressList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressSpec.

func (*VirtualMachineIPAddressSpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineIPAddressStatus.

func (*VirtualMachineIPAddressStatus) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineLaunchTimeDuration.

func (*VirtualMachineLaunchTimeDuration) DeepCopyInto

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

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 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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineMigrationState.

func (*VirtualMachineMigrationState) DeepCopyInto

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 resource provides the ability to declaratively manage state changes of virtual machines. +kubebuilder:object:root=true +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={virtualization,all},scope=Namespaced,shortName={vmop,vmops},singular=virtualmachineoperation +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="VirtualMachineOperation phase." +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 creation resource." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineOperation) DeepCopy

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 VirtualMachineOperationList

type VirtualMachineOperationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []VirtualMachineOperation `json:"items"`
}

VirtualMachineOperationList contains a list of VirtualMachineOperation +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineOperationList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationList.

func (*VirtualMachineOperationList) DeepCopyInto

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 VirtualMachineOperationSpec

type VirtualMachineOperationSpec struct {
	Type VMOPType `json:"type"`
	// The name of the virtual machine for which the operation is performed.
	VirtualMachine string `json:"virtualMachineName"`
	// Force the execution of the operation. Applies only for Restart and Stop. In this case, the action on the virtual machine is performed immediately.
	Force bool `json:"force,omitempty"`
}

+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 == 'Migrate' ? !has(self.force) || !self.force : true",message="The `Migrate` operation cannot be performed forcibly."

func (*VirtualMachineOperationSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationSpec.

func (*VirtualMachineOperationSpec) DeepCopyInto

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"`
	// The latest detailed observations of the VirtualMachineOperation resource.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	//  The generation last processed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

func (*VirtualMachineOperationStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineOperationStatus.

func (*VirtualMachineOperationStatus) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachinePhaseTransitionTimestamp.

func (*VirtualMachinePhaseTransitionTimestamp) DeepCopyInto

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 VirtualMachineRestore

type VirtualMachineRestore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VirtualMachineRestoreSpec   `json:"spec"`
	Status VirtualMachineRestoreStatus `json:"status,omitempty"`
}

VirtualMachineRestore provides a resource that allows to restore a snapshot of the virtual machine and all its resources.

+kubebuilder:object:root=true +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories=virtualization,scope=Namespaced,shortName={vmrestore,vmrestores},singular=virtualmachinerestore +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="VirtualMachineRestore phase." +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="VirtualMachineRestore age." +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineRestore) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestore.

func (*VirtualMachineRestore) DeepCopyInto

func (in *VirtualMachineRestore) DeepCopyInto(out *VirtualMachineRestore)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VirtualMachineRestore) DeepCopyObject

func (in *VirtualMachineRestore) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VirtualMachineRestoreList

type VirtualMachineRestoreList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []VirtualMachineRestore `json:"items"`
}

VirtualMachineRestoreList contains a list of `VirtualMachineRestore` +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineRestoreList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestoreList.

func (*VirtualMachineRestoreList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VirtualMachineRestoreList) DeepCopyObject

func (in *VirtualMachineRestoreList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VirtualMachineRestorePhase

type VirtualMachineRestorePhase string

VirtualMachineRestorePhase defines current status of resource: * Pending - the resource has been created and is on a waiting queue. * InProgress - the process of creating the virtual machine from the snapshot is currently underway. * Ready - the virtual machine creation from the snapshot has successfully completed. * Failed - an error occurred during the virtual machine creation process. * Terminating - the resource is in the process of being deleted.

+kubebuilder:validation:Enum={Pending,InProgress,Ready,Failed,Terminating}

const (
	VirtualMachineRestorePhasePending     VirtualMachineRestorePhase = "Pending"
	VirtualMachineRestorePhaseInProgress  VirtualMachineRestorePhase = "InProgress"
	VirtualMachineRestorePhaseReady       VirtualMachineRestorePhase = "Ready"
	VirtualMachineRestorePhaseFailed      VirtualMachineRestorePhase = "Failed"
	VirtualMachineRestorePhaseTerminating VirtualMachineRestorePhase = "Terminating"
)

type VirtualMachineRestoreSpec

type VirtualMachineRestoreSpec struct {
	// The name of virtual machine snapshot to restore the virtual machine.
	//
	// +kubebuilder:validation:MinLength=1
	VirtualMachineSnapshotName string `json:"virtualMachineSnapshotName"`
	// Redefining the virtual machine resource names.
	NameReplacements []NameReplacement `json:"nameReplacements,omitempty"`
}

func (*VirtualMachineRestoreSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestoreSpec.

func (*VirtualMachineRestoreSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VirtualMachineRestoreStatus

type VirtualMachineRestoreStatus struct {
	Phase VirtualMachineRestorePhase `json:"phase"`
	// Contains details of the current state of this API Resource.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// The generation last processed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

func (*VirtualMachineRestoreStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineRestoreStatus.

func (*VirtualMachineRestoreStatus) DeepCopyInto

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 +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization} +kubebuilder:subresource:status +kubebuilder:resource:categories={all,virtualization},scope=Namespaced,shortName={vmsnapshot,vmsnapshots},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

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` +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VirtualMachineSnapshotList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotList.

func (*VirtualMachineSnapshotList) DeepCopyInto

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 VirtualMachineSnapshotPhase

type VirtualMachineSnapshotPhase string

VirtualMachineSnapshotPhase defines current status of resource:

* Pending - the resource has been created and is on a waiting queue. * InProgress - the process of creating the snapshot is currently underway. * Ready - the snapshot creation has successfully completed, and the virtual machine snapshot is now available. * Failed - an error occurred during the snapshotting process. * Terminating - the resource is in the process of 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 {
	// The name of virtual machine to take snapshot.
	//
	// +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 value is true, the snapshot of the virtual machine will be taken only in the following scenarios:
	// - the virtual machine is powered off.
	// - the virtual machine with an agent, and the freeze operation was successful.
	//
	// +kubebuilder:default:=true
	RequiredConsistency bool `json:"requiredConsistency"`
	// +kubebuilder:default:="Always"
	KeepIPAddress         KeepIPAddress             `json:"keepIPAddress"`
	VolumeSnapshotClasses []VolumeSnapshotClassName `json:"volumeSnapshotClasses,omitempty"`
}

func (*VirtualMachineSnapshotSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotSpec.

func (*VirtualMachineSnapshotSpec) DeepCopyInto

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"`
	// The virtual machine snapshot is consistent.
	Consistent *bool `json:"consistent,omitempty"`
	// The name of underlying `Secret`, created for virtual machine snapshotting.
	VirtualMachineSnapshotSecretName string `json:"virtualMachineSnapshotSecretName,omitempty"`
	// The list of `VirtualDiskSnapshot` names for the snapshots taken from the virtual disks of the associated virtual machine.
	VirtualDiskSnapshotNames []string `json:"virtualDiskSnapshotNames,omitempty"`
	// The latest detailed observations of the VirtualMachineSnapshot resource.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// The generation last processed by the controller.
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

func (*VirtualMachineSnapshotStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineSnapshotStatus.

func (*VirtualMachineSnapshotStatus) DeepCopyInto

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"`

	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.
	// +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"`
}

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.

type VirtualMachineStats

type VirtualMachineStats struct {
	// The history of phases.
	PhasesTransitions []VirtualMachinePhaseTransitionTimestamp `json:"phasesTransitions,omitempty"`
	// Launch information.
	LaunchTimeDuration VirtualMachineLaunchTimeDuration `json:"launchTimeDuration,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 `virtualMachineIPAddressName` holding the ip address of the VirtualMachine.
	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"`

	// 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"`
	Resources          ResourcesStatus     `json:"resources,omitempty"`
}

func (*VirtualMachineStatus) DeepCopy

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 VolumeSnapshotClassName

type VolumeSnapshotClassName struct {
	// The `StorageClass` name associated with `VolumeSnapshotClass`.
	StorageClassName string `json:"storageClassName"`
	// The name of `VolumeSnapshotClass` to use for virtual disk snapshotting.
	VolumeSnapshotClassName string `json:"volumeSnapshotClassName"`
}

VolumeSnapshotClassName defines `StorageClass` and `VolumeSnapshotClass` binding.

func (*VolumeSnapshotClassName) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotClassName.

func (*VolumeSnapshotClassName) DeepCopyInto

func (in *VolumeSnapshotClassName) DeepCopyInto(out *VolumeSnapshotClassName)

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeightedVirtualMachineAndPodAffinityTerm.

func (*WeightedVirtualMachineAndPodAffinityTerm) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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