Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=virtualservers.coreweave.com
Package v1alpha1 defines the VirtualServer types and associated functions. The VirtualServer facilitates the creation and management of Virtual Server instances on the Coreweave Cloud kubernetes platform.
Examples on creation and management of VirtualServers are available in the Examples section.
Example (Create) ¶
The example describes the creation of a VirtualServer on the Coreweave Cloud kubernetes platform
package main import ( "context" "fmt" "os" vsv1alpha "github.com/coreweave/virtual-server/api/v1alpha1" corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" ) func main() { // Create the a new kube client // Uses the value of the KUBECONFIG environment variable as a filepath to a kube config file c, err := client.New(config.GetConfigOrDie(), client.Options{}) if err != nil { fmt.Println("Failed to create client") os.Exit(1) } vsv1alpha.AddToScheme(c.Scheme()) // Create a new VirtualServer with the name "my-virtual-server" to be deployed in the "default" namespace virtualServer := vsv1alpha.NewVirtualServer("my-virtual-server", "default") // Set the region the VirtualServer will be deployed to virtualServer.SetRegion("ord1") // Specify the VirtualServer operating system virtualServer.SetOS(vsv1alpha.VirtualServerOSTypeLinux) // Set a GPU type request for the VirtualServer virtualServer.SetGPUType("Quadro_RTX_4000") // Set the number of GPUs to request for the VirtualServer virtualServer.SetGPUCount(1) // Set the cpu core count for the VirtualServer virtualServer.SetCPUCount(2) // Set the memory request for the VirtualServer virtualServer.SetMemory("16Gi") // Add a user to be added by cloudinit virtualServer.AddUser(vsv1alpha.VirtualServerUser{ Username: "myuser", Password: "password", }) // Configure the root filesystem of the VirtualServer to clone a preexisting PVC named ubuntu1804-docker-master-20210210-ewr1 // sourced in the vd-images namespace err = virtualServer.ConfigureStorageRootWithPVCSource(vsv1alpha.VirtualServerStorageRootPVCSource{ Size: "40Gi", PVCName: "ubuntu1804-docker-master-20210210-ewr1", PVCNamespace: "vd-images", StorageClassName: "block-nvme-ewr1", VolumeMode: corev1.PersistentVolumeBlock, AccessMode: corev1.ReadWriteOnce, }) if err != nil { fmt.Println("Cound not configure root filesystem") } // Expose tcp ports 22 and 443 on the VirtualServer virtualServer.ExposeTCPPorts([]int32{22, 443}) // Enable a public IP services virtualServer.EnablePublicIP(true) // Expose a single udp port 4172 on the VirtualServer virtualServer.ExposeUDPPort(4172) // Set the VirtualServer to start as soon as it is created virtualServer.InitializeRunning(true) // Create the VirtualServer via the kube client err = c.Create(context.Background(), virtualServer) if err != nil { fmt.Printf("Failed to create VirtualServer\nReason: %s", err.Error()) } }
Output:
Example (Get) ¶
The example describes how to get a VirtualServer running on the Coreweave Cloud kubernetes platform
package main import ( "context" "fmt" "os" vsv1alpha "github.com/coreweave/virtual-server/api/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" ) func main() { // Create the a new kube client // Uses the value of the KUBECONFIG environment variable as a filepath to a kube config file c, err := client.New(config.GetConfigOrDie(), client.Options{}) if err != nil { fmt.Println("Failed to create client") os.Exit(1) } vsv1alpha.AddToScheme(c.Scheme()) virtualServer := &vsv1alpha.VirtualServer{} // Get the VirtualServer named "my-virtual-server" in the "default" namespace err = c.Get(context.Background(), client.ObjectKey{ Namespace: "default", Name: "my-virtual-server", }, virtualServer) if err != nil { fmt.Println("Failed to get VirtualServer") } fmt.Printf("Name: %s\nNamespace: %s\n", virtualServer.Name, virtualServer.Namespace) }
Output: Name: my-virtual-server Namespace: default
Example (GetStatus) ¶
The example describes how to get the ready status of a VirtualServer running on the Coreweave Cloud kubernetes platform
package main import ( "context" "fmt" "os" vsv1alpha "github.com/coreweave/virtual-server/api/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" ) func main() { // Create the a new kube client // Uses the value of the KUBECONFIG environment variable as a filepath to a kube config file c, err := client.New(config.GetConfigOrDie(), client.Options{}) if err != nil { fmt.Println("Failed to create client") os.Exit(1) } vsv1alpha.AddToScheme(c.Scheme()) virtualServer := &vsv1alpha.VirtualServer{} // Get the VirtualServer named "my-virtual-server" in the "default" namespace err = c.Get(context.Background(), client.ObjectKey{ Namespace: "default", Name: "my-virtual-server", }, virtualServer) if err != nil { fmt.Println("Failed to get VirtualServer") } // Get the ready status of the VirtualServer status := virtualServer.GetReadyStatus() if status != nil { fmt.Printf("Status: %s", status.Status) } fmt.Printf(` Network: InternalIP: %s ExternalIP: %s `, virtualServer.Status.InternalIP(), virtualServer.Status.ExternalIP(), ) }
Output: Status: "True" or "False" Network: InternalIP: <IP> TCP: <IP> UDP: <IP>
Index ¶
- Constants
- Variables
- type DiskAttributes
- type Firmware
- type Port
- type SystemPresetClass
- type VirtualServer
- func (vs *VirtualServer) AddCloudInit(cloudInit string) error
- func (vs *VirtualServer) AddDNSConfig(dnsConfig *corev1.PodDNSConfig)
- func (vs *VirtualServer) AddDNSPolicy(dnsPolicy *corev1.DNSPolicy)
- func (vs *VirtualServer) AddEmptyDisk(name string, size string) error
- func (vs *VirtualServer) AddFloatingIP(loadBalancerServiceName string)
- func (vs *VirtualServer) AddPVCDisk(name string, pvcName string, readOnly bool)
- func (vs *VirtualServer) AddPVCFileSystem(name string, pvcName string, readOnly bool)
- func (vs *VirtualServer) AddSwap(size string) error
- func (vs *VirtualServer) AddUser(user VirtualServerUser)
- func (vs *VirtualServer) AddVPC(vpcName string)
- func (vs *VirtualServer) ConfigureStorageRootWithHTTPSource(source VirtualServerStorageRootHTTPSource) error
- func (vs *VirtualServer) ConfigureStorageRootWithPVCSource(source VirtualServerStorageRootPVCSource) error
- func (in *VirtualServer) DeepCopy() *VirtualServer
- func (in *VirtualServer) DeepCopyInto(out *VirtualServer)
- func (in *VirtualServer) DeepCopyObject() runtime.Object
- func (vs *VirtualServer) DirectAttachLoadBalancerIP(attach bool)
- func (vs *VirtualServer) EnablePublicIP(enable bool)
- func (vs *VirtualServer) EnableUEFIBoot(enable bool)
- func (vs *VirtualServer) ExposeTCPPort(port int32) error
- func (vs *VirtualServer) ExposeTCPPorts(ports []int32) error
- func (vs *VirtualServer) ExposeUDPPort(port int32) error
- func (vs *VirtualServer) ExposeUDPPorts(ports []int32) error
- func (vs *VirtualServer) GetReadyStatus() *metav1.Condition
- func (vs *VirtualServer) GetVMReadyStatus() *metav1.Condition
- func (vs *VirtualServer) HasNoConditions() bool
- func (vs *VirtualServer) InitializeRunning(initRunning bool)
- func (vs *VirtualServer) InitializeStatus()
- func (vs *VirtualServer) IsGpuServer() bool
- func (vs *VirtualServer) IsValidCloudInit() error
- func (vs *VirtualServer) RunStrategy(runStrategy kvv1.VirtualMachineRunStrategy)
- func (vs *VirtualServer) SetCPUCount(cpuCount uint32)
- func (vs *VirtualServer) SetCPUType(cpuType string) error
- func (vs *VirtualServer) SetCondition(conditionType VirtualServerConditionType, status metav1.ConditionStatus, ...)
- func (vs *VirtualServer) SetDiskSerial(name, serial string) bool
- func (vs *VirtualServer) SetFirmwareSerial(serial string) error
- func (vs *VirtualServer) SetFirmwareUUID(uuid types.UID) error
- func (vs *VirtualServer) SetGPUCount(gpuCount uint32) error
- func (vs *VirtualServer) SetGPUType(gpuType string) error
- func (vs *VirtualServer) SetHeadless(headless bool)
- func (vs *VirtualServer) SetMacAddress(macAddress string) error
- func (vs *VirtualServer) SetMemory(memory string) error
- func (vs *VirtualServer) SetOS(os VirtualServerOSType)
- func (vs *VirtualServer) SetRegion(region string)
- func (vs *VirtualServer) SetResourceDefinition(definitionVersion string)
- func (vs *VirtualServer) SystemClass() SystemPresetClass
- func (vs *VirtualServer) SystemType() string
- func (vs *VirtualServer) TerminationGracePeriodSeconds(seconds int64)
- func (vs *VirtualServer) UpdateVirtualMachineStartedCondition(running bool)
- func (vs *VirtualServer) UseVirtioTransitional(useVirtioTransitional bool)
- type VirtualServerConditionReason
- type VirtualServerConditionType
- type VirtualServerDisks
- type VirtualServerFilesystem
- type VirtualServerFloatingIP
- type VirtualServerList
- type VirtualServerNetwork
- type VirtualServerNetworkStatus
- type VirtualServerOS
- type VirtualServerOSType
- type VirtualServerResourceCPU
- type VirtualServerResourceGPU
- type VirtualServerResources
- type VirtualServerServiceTemplate
- type VirtualServerSpec
- type VirtualServerStatus
- type VirtualServerStorage
- type VirtualServerStorageRoot
- type VirtualServerStorageRootHTTPSource
- type VirtualServerStorageRootPVCSource
- type VirtualServerStorageVolume
- type VirtualServerUser
- type VirtualServerVPC
Examples ¶
Constants ¶
const FirmwareSerialRegEx = `^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
const MacAddressRegEx = `^[0-9a-f][26ae][:]([0-9a-f]{2}[:]){4}([0-9a-f]{2})|[0-9A-F][26AE][-]([0-9A-F]{2}[-]){4}([0-9A-F]{2})$`
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "virtualservers.coreweave.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type DiskAttributes ¶ added in v1.31.0
type DiskAttributes struct { // ReadOnly // +optional ReadOnly bool `json:"readOnly,omitempty"` // Disk serial number // +optional Serial string `json:"serial,omitempty"` }
DiskAttributes describes disk sttributes
func (*DiskAttributes) DeepCopy ¶ added in v1.31.0
func (in *DiskAttributes) DeepCopy() *DiskAttributes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskAttributes.
func (*DiskAttributes) DeepCopyInto ¶ added in v1.31.0
func (in *DiskAttributes) DeepCopyInto(out *DiskAttributes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Firmware ¶ added in v1.24.0
type Firmware struct { // UUID reported by the vmi bios. // Defaults to a random generated uid. // +optional UUID types.UID `json:"uuid,omitempty"` // The system-serial-number in SMBIOS // +optional Serial string `json:"serial,omitempty"` }
func (*Firmware) DeepCopy ¶ added in v1.24.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Firmware.
func (*Firmware) DeepCopyInto ¶ added in v1.24.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemPresetClass ¶ added in v1.1.7
type SystemPresetClass string
+kubebuilder:validation:Enum=cpu;gpu
const ( SystemPresetClassCPU SystemPresetClass = "cpu" SystemPresetClassGPU SystemPresetClass = "gpu" )
type VirtualServer ¶
type VirtualServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VirtualServerSpec `json:"spec,omitempty"` Status VirtualServerStatus `json:"status,omitempty"` }
VirtualServer is the Schema for the virtualservers API. It allows for configuring a Virtual Server instance on the Coreweave Cloud kubernetes platform. The VirtualServer handles the creation and lifecycle of a VirtualMachine and Services.
func NewVirtualServer ¶
func NewVirtualServer(name string, namespace string) *VirtualServer
Returns a VirtualServer with the provided name and namespace
func (*VirtualServer) AddCloudInit ¶ added in v1.12.0
func (vs *VirtualServer) AddCloudInit(cloudInit string) error
Add custom CloudInit attribute to VirtualServer
func (*VirtualServer) AddDNSConfig ¶ added in v1.16.0
func (vs *VirtualServer) AddDNSConfig(dnsConfig *corev1.PodDNSConfig)
func (*VirtualServer) AddDNSPolicy ¶ added in v1.16.0
func (vs *VirtualServer) AddDNSPolicy(dnsPolicy *corev1.DNSPolicy)
func (*VirtualServer) AddEmptyDisk ¶ added in v1.27.0
func (vs *VirtualServer) AddEmptyDisk(name string, size string) error
Add an ephemeral EmptyDisk as a disk to the VirtualServer
func (*VirtualServer) AddFloatingIP ¶
func (vs *VirtualServer) AddFloatingIP(loadBalancerServiceName string)
Add a floating IP to the VirtualServer The loadbalancer IP will be extracted from an existing loadbalancer service with the provided name
func (*VirtualServer) AddPVCDisk ¶
func (vs *VirtualServer) AddPVCDisk(name string, pvcName string, readOnly bool)
Add a PVC as a disk to the VirtualServer
func (*VirtualServer) AddPVCFileSystem ¶
func (vs *VirtualServer) AddPVCFileSystem(name string, pvcName string, readOnly bool)
Add a filesystem to be mounted into the VirtualServer from a PVC
func (*VirtualServer) AddSwap ¶
func (vs *VirtualServer) AddSwap(size string) error
func (*VirtualServer) AddUser ¶
func (vs *VirtualServer) AddUser(user VirtualServerUser)
Add a user to the VirtualServer The user will be used to configure the VirtualServer via cloudinit if supported
func (*VirtualServer) AddVPC ¶ added in v1.27.0
func (vs *VirtualServer) AddVPC(vpcName string)
func (*VirtualServer) ConfigureStorageRootWithHTTPSource ¶
func (vs *VirtualServer) ConfigureStorageRootWithHTTPSource(source VirtualServerStorageRootHTTPSource) error
Configure the root storage with a url to an image as the source
func (*VirtualServer) ConfigureStorageRootWithPVCSource ¶
func (vs *VirtualServer) ConfigureStorageRootWithPVCSource(source VirtualServerStorageRootPVCSource) error
Configure the root storage with a PVC as the source
func (*VirtualServer) DeepCopy ¶
func (in *VirtualServer) DeepCopy() *VirtualServer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServer.
func (*VirtualServer) DeepCopyInto ¶
func (in *VirtualServer) DeepCopyInto(out *VirtualServer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualServer) DeepCopyObject ¶
func (in *VirtualServer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VirtualServer) DirectAttachLoadBalancerIP ¶
func (vs *VirtualServer) DirectAttachLoadBalancerIP(attach bool)
Enable/disable DirectAttachLoadBalancerIP
func (*VirtualServer) EnablePublicIP ¶ added in v1.5.4
func (vs *VirtualServer) EnablePublicIP(enable bool)
func (*VirtualServer) EnableUEFIBoot ¶ added in v1.11.0
func (vs *VirtualServer) EnableUEFIBoot(enable bool)
func (*VirtualServer) ExposeTCPPort ¶
func (vs *VirtualServer) ExposeTCPPort(port int32) error
Expose a TCP port on the VirtualServer
func (*VirtualServer) ExposeTCPPorts ¶
func (vs *VirtualServer) ExposeTCPPorts(ports []int32) error
Expose TCP ports on the VirtualServer
func (*VirtualServer) ExposeUDPPort ¶
func (vs *VirtualServer) ExposeUDPPort(port int32) error
Expose a UDP port on the VirtualServer
func (*VirtualServer) ExposeUDPPorts ¶
func (vs *VirtualServer) ExposeUDPPorts(ports []int32) error
Expose UDP ports on the VirtualServer
func (*VirtualServer) GetReadyStatus ¶
func (vs *VirtualServer) GetReadyStatus() *metav1.Condition
func (*VirtualServer) GetVMReadyStatus ¶ added in v1.5.0
func (vs *VirtualServer) GetVMReadyStatus() *metav1.Condition
func (*VirtualServer) HasNoConditions ¶
func (vs *VirtualServer) HasNoConditions() bool
HasNoConditions returns true if the VirtualServer has no conditions defined
func (*VirtualServer) InitializeRunning ¶
func (vs *VirtualServer) InitializeRunning(initRunning bool)
Set whether the VirtualServer will automatically start upon creation
func (*VirtualServer) InitializeStatus ¶ added in v1.3.0
func (vs *VirtualServer) InitializeStatus()
InitializeStatus sets the default VirtualServer status and conditions
func (*VirtualServer) IsGpuServer ¶
func (vs *VirtualServer) IsGpuServer() bool
IsGpuServer returns true if the VirtualServer is GPU enabled
func (*VirtualServer) IsValidCloudInit ¶ added in v1.12.0
func (vs *VirtualServer) IsValidCloudInit() error
func (*VirtualServer) RunStrategy ¶ added in v1.15.2
func (vs *VirtualServer) RunStrategy(runStrategy kvv1.VirtualMachineRunStrategy)
func (*VirtualServer) SetCPUCount ¶
func (vs *VirtualServer) SetCPUCount(cpuCount uint32)
Set the VirtualServer CPU core count
func (*VirtualServer) SetCPUType ¶
func (vs *VirtualServer) SetCPUType(cpuType string) error
Set the VirtualServer CPU type
func (*VirtualServer) SetCondition ¶
func (vs *VirtualServer) SetCondition( conditionType VirtualServerConditionType, status metav1.ConditionStatus, reason VirtualServerConditionReason, message *string, applyToTopLevelCondition bool, )
Set the status condition of the virtualServer. If message is nil, the condition message will be set to a string casted form of reason. If applyToTopLevelCondition is true the status and message will be applied to the top level, VSConditionTypeReady, condition as well
func (*VirtualServer) SetDiskSerial ¶ added in v1.31.0
func (vs *VirtualServer) SetDiskSerial(name, serial string) bool
SetDiskSerial sets the disk serial number. It sets serial for root disk when name is "root" or for other additional disk name when disk does not exist it returns false
func (*VirtualServer) SetFirmwareSerial ¶ added in v1.24.0
func (vs *VirtualServer) SetFirmwareSerial(serial string) error
func (*VirtualServer) SetFirmwareUUID ¶ added in v1.24.0
func (vs *VirtualServer) SetFirmwareUUID(uuid types.UID) error
func (*VirtualServer) SetGPUCount ¶
func (vs *VirtualServer) SetGPUCount(gpuCount uint32) error
Set the VirtualServer GPU count
func (*VirtualServer) SetGPUType ¶
func (vs *VirtualServer) SetGPUType(gpuType string) error
Set the VirtualServer GPU type
func (*VirtualServer) SetHeadless ¶ added in v1.26.0
func (vs *VirtualServer) SetHeadless(headless bool)
func (*VirtualServer) SetMacAddress ¶ added in v1.20.0
func (vs *VirtualServer) SetMacAddress(macAddress string) error
func (*VirtualServer) SetMemory ¶
func (vs *VirtualServer) SetMemory(memory string) error
Set the VirtualServer Memory (RAM) size
func (*VirtualServer) SetOS ¶
func (vs *VirtualServer) SetOS(os VirtualServerOSType)
Set the VirtualServer OS
func (*VirtualServer) SetRegion ¶
func (vs *VirtualServer) SetRegion(region string)
Set the VirtualServer region
func (*VirtualServer) SetResourceDefinition ¶
func (vs *VirtualServer) SetResourceDefinition(definitionVersion string)
Set the VirtualServer resource definition
func (*VirtualServer) SystemClass ¶
func (vs *VirtualServer) SystemClass() SystemPresetClass
SystemClass returns the VirtualServer system class. Classes are either "cpu" or "cpu"
func (*VirtualServer) SystemType ¶
func (vs *VirtualServer) SystemType() string
SystemType returns the VirtualServer system type. Types are defined in the VirtualServer resources request under either GPU or CPU
func (*VirtualServer) TerminationGracePeriodSeconds ¶ added in v1.25.0
func (vs *VirtualServer) TerminationGracePeriodSeconds(seconds int64)
func (*VirtualServer) UpdateVirtualMachineStartedCondition ¶
func (vs *VirtualServer) UpdateVirtualMachineStartedCondition(running bool)
UpdateVirtualMachineStartedCondition will set the VirtualServer conditions that indicate that the underlying VirtualMachine has started
func (*VirtualServer) UseVirtioTransitional ¶ added in v1.25.0
func (vs *VirtualServer) UseVirtioTransitional(useVirtioTransitional bool)
type VirtualServerConditionReason ¶
type VirtualServerConditionReason string
const ( // VSConditionReasonInitializing indicates that the VirtualServer is initializing for the first time VSConditionReasonInitializing VirtualServerConditionReason = "Initializing" // VSConditionReasonPending indicates that the VirtualServer is pending an update to its spec VSConditionReasonPending VirtualServerConditionReason = "Pending" // VSConditionReasonTerminating indicates that a VirtualServer resource is terminating VSConditionReasonTerminating VirtualServerConditionReason = "Terminating" // VSConditionReasonFailed indicates that the VirtualServer was not able to create or start VSConditionReasonFailed VirtualServerConditionReason = "Failed" // VSConditionReasonReady indicates that the VirtualServer has successfully been created and is ready for use VSConditionReasonReady VirtualServerConditionReason = "VirtualServerReady" // VSConditionReasonStarted indicates that the VirtualServer has started VSConditionReasonStarted VirtualServerConditionReason = "VirtualServerStarted" // VSConditionReasonStopped indicates that the VirtualServer been stopped VSConditionReasonStopped VirtualServerConditionReason = "VirtualServerStopped" // VSConditionReasonVMIShutdown indicates that the Virtual Machine Instance has been shut down VSConditionReasonVMIShutdown VirtualServerConditionReason = "VirtualMachineInstanceShutdown" // VSConditionReasonDefinitionDeprecated indicates that the definition used to configure the VirtualServer has been deprecated and a manual update is required VSConditionReasonDefinitionDeprecated VirtualServerConditionReason = "DefinitionDeprecated" // VSConditionReasonServicesCreated indicates that the VirtualServer services have been successfully created VSConditionReasonServicesCreated VirtualServerConditionReason = "ServicesCreated" // VSConditionReasonWaitingForServices indicates that the VirtualServer is waiting for the required services to be ready VSConditionReasonWaitingForServices VirtualServerConditionReason = "WaitingForServices" // VSConditionReasonServicesReady indicates that the required services are ready VSConditionReasonServicesReady VirtualServerConditionReason = "ServicesReady" // VSConditionReasonVMNameTaken indicates that the name of the underlying VirtualMachine already exists or is owned by another VirtualServer and therefore could not be created VSConditionReasonVMNameTaken VirtualServerConditionReason = "VirtualMachineNameTaken" // VSConditionReasonVMReady indicates that the underlying VirtualMachine is ready VSConditionReasonVMReady VirtualServerConditionReason = "VirtualMachineReady" // VSConditionReasonSecretCreated indicates that the VirtualServer secret have been successfully created VSConditionReasonSecretCreated VirtualServerConditionReason = "SecretCreated" // VSConditionReasonWaitingForSecret indicates that the VirtualServer is waiting for the required secret to be ready VSConditionReasonWaitingForSecrets VirtualServerConditionReason = "WaitingForSecret" // VSConditionReasonResizeInProgress indicates that the VirtualServer root disk is being resized VSConditionReasonResizeInProgress VirtualServerConditionReason = "RootDiskResizeinProgress" )
type VirtualServerConditionType ¶
type VirtualServerConditionType string
const ( // VSConditionTypeReady describes the ready state of the Virtual Server VSConditionTypeReady VirtualServerConditionType = "Ready" // VSConditionTypeStarted describes whether the VirtualServer has been started VSConditionTypeStarted VirtualServerConditionType = "VirtualServerStarted" // VSConditionTypeServicesReady describes the ready state of the services dynamically created and/or those required by the VirtualServer VSConditionTypeServicesReady VirtualServerConditionType = "ServicesReady" // VSConditionTypeVMReady describes the ready state of the underlying VirtualMachine VSConditionTypeVMReady VirtualServerConditionType = "VirtualMachineReady" // VSConditionTypeServicesReady describes the ready state of the services dynamically created and/or those required by the VirtualServer VSConditionTypeSecretReady VirtualServerConditionType = "SecretReady" )
type VirtualServerDisks ¶ added in v1.31.0
type VirtualServerDisks struct { VirtualServerStorageVolume `json:",inline"` DiskAttributes `json:",inline"` }
func (*VirtualServerDisks) DeepCopy ¶ added in v1.31.0
func (in *VirtualServerDisks) DeepCopy() *VirtualServerDisks
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerDisks.
func (*VirtualServerDisks) DeepCopyInto ¶ added in v1.31.0
func (in *VirtualServerDisks) DeepCopyInto(out *VirtualServerDisks)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerFilesystem ¶ added in v1.8.0
type VirtualServerFilesystem struct { VirtualServerStorageVolume `json:",inline"` // +optional Mountpoint *string `json:"mountPoint,omitempty"` }
func (*VirtualServerFilesystem) DeepCopy ¶ added in v1.8.0
func (in *VirtualServerFilesystem) DeepCopy() *VirtualServerFilesystem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerFilesystem.
func (*VirtualServerFilesystem) DeepCopyInto ¶ added in v1.8.0
func (in *VirtualServerFilesystem) DeepCopyInto(out *VirtualServerFilesystem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerFloatingIP ¶
type VirtualServerFloatingIP struct { // The name of an existing LoadBalancer Service to use as the Floating IP source ServiceName string `json:"serviceName"` }
VirtualServerFloatingIP represents a source that will be used for a VirtualServer floating IP
func (*VirtualServerFloatingIP) DeepCopy ¶
func (in *VirtualServerFloatingIP) DeepCopy() *VirtualServerFloatingIP
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerFloatingIP.
func (*VirtualServerFloatingIP) DeepCopyInto ¶
func (in *VirtualServerFloatingIP) DeepCopyInto(out *VirtualServerFloatingIP)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerList ¶
type VirtualServerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []VirtualServer `json:"items"` }
VirtualServerList contains a list of VirtualServer
func (*VirtualServerList) DeepCopy ¶
func (in *VirtualServerList) DeepCopy() *VirtualServerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerList.
func (*VirtualServerList) DeepCopyInto ¶
func (in *VirtualServerList) DeepCopyInto(out *VirtualServerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualServerList) DeepCopyObject ¶
func (in *VirtualServerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type VirtualServerNetwork ¶
type VirtualServerNetwork struct { // If enabled, a Service will be dynamically created, and its IP directly attached to the VirtualServer // DirectAttachLoadBalancerIP may not be set if UDP or TCP VirtualServerPorts are defined DirectAttachLoadBalancerIP bool `json:"directAttachLoadBalancerIP,omitempty"` // FloatingIPs is an array of LoadBalancer Services // The Services LoadBalancer IPs will be used for the floating IPs of the VirtualServer FloatingIPs []VirtualServerFloatingIP `json:"floatingIPs,omitempty"` // TCP describes a list of tcp ports that are exposed by the VirtualServer // A Service will be dynamically created and linked to the VirtualServer // A maximum of 10 ports may be defined TCP VirtualServerServiceTemplate `json:"tcp,omitempty"` // UDP describes a list of udp ports that are exposed by the VirtualServer // A Service will be dynamically created and linked to the VirtualServer // A maximum of 10 ports may be defined UDP VirtualServerServiceTemplate `json:"udp,omitempty"` // If Public is true a public IP will be assigned to the created Services // Defaults to true // +optional // +kubebuilder:default=true Public bool `json:"public"` // DNSConfig defines the DNS parameters of a VMI in addition to those generated from DNSPolicy. // +optional DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"` // Set DNS policy for the VMI. Defaults to "ClusterFirst". // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. // +optional // +kubebuilder:validation:Enum=ClusterFirstWithHostNet;ClusterFirst;Default;None DNSPolicy *corev1.DNSPolicy `json:"dnsPolicy,omitempty"` // Set MAC address for the VMI. It must be a local unicast type. // +optional // +kubebuilder:validation:Pattern="^[0-9a-f][26ae][:]([0-9a-f]{2}[:]){4}([0-9a-f]{2})|[0-9A-F][26AE][-]([0-9A-F]{2}[-]){4}([0-9A-F]{2})$" MACAddress string `json:"macAddress,omitempty"` // When DirectAttachLoadBalancerIP is false or no ports are specified, create a headless service. Defaults to false. // +optional // +kubebuilder:default=false Headless bool `json:"headless,omitempty"` // List of VPC networks // +optional VPCs []VirtualServerVPC `json:"vpcs,omitempty"` // Disable kubernetes pod network within the Virtual Server // Useful for isolating a Virtual Server in VPC networks DisableK8sNetworking bool `json:"disableK8sNetworking,omitempty"` }
VirtualServerNetwork defines the network configuration of the VirtualServer
func (*VirtualServerNetwork) DeepCopy ¶
func (in *VirtualServerNetwork) DeepCopy() *VirtualServerNetwork
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerNetwork.
func (*VirtualServerNetwork) DeepCopyInto ¶
func (in *VirtualServerNetwork) DeepCopyInto(out *VirtualServerNetwork)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerNetworkStatus ¶ added in v1.3.0
type VirtualServerNetworkStatus struct { InternalIP *string `json:"internalIP,omitempty"` ExternalIP *string `json:"externalIP,omitempty"` ServiceIP *string `json:"serviceIP,omitempty"` FloatingIPs map[string]string `json:"floatingIPs,omitempty"` }
func (*VirtualServerNetworkStatus) DeepCopy ¶ added in v1.3.0
func (in *VirtualServerNetworkStatus) DeepCopy() *VirtualServerNetworkStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerNetworkStatus.
func (*VirtualServerNetworkStatus) DeepCopyInto ¶ added in v1.3.0
func (in *VirtualServerNetworkStatus) DeepCopyInto(out *VirtualServerNetworkStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerOS ¶
type VirtualServerOS struct { // The Operating System run in the Virtual Server // VirtualServerOSType may be "windows" or "linux" // +kubebuilder:validation:Enum=windows;linux Type VirtualServerOSType `json:"type"` // The operating system configuration definition for internal use // See https://docs.coreweave.com/virtual-desktop for details on which definition value best suits your configuration. // Defaults to "a" // +optional // +kubebuilder:default=a Definition string `json:"definition,omitempty"` // Configure the Virtual Server use a UEFI bootloader // +optional EnableUEFIBoot bool `json:"enableUEFIBoot,omitempty"` }
VirtualServerOS defines the Operating System of the VirtualServer
func (*VirtualServerOS) DeepCopy ¶
func (in *VirtualServerOS) DeepCopy() *VirtualServerOS
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerOS.
func (*VirtualServerOS) DeepCopyInto ¶
func (in *VirtualServerOS) DeepCopyInto(out *VirtualServerOS)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerOSType ¶
type VirtualServerOSType string
const ( // VirtualServer Linux operating system VirtualServerOSTypeLinux VirtualServerOSType = "linux" // VirtualServer Windows operating system VirtualServerOSTypeWindows VirtualServerOSType = "windows" )
type VirtualServerResourceCPU ¶
type VirtualServerResourceCPU struct { // Type is the CPU type to request // See Coreweave Metadata API for available CPU types // +optional Type *string `json:"type,omitempty"` // The number of CPU cores to request // +optional // +kubebuilder:default=2 // +kubebuilder:validation:Minimum=1 Count uint32 `json:"count"` }
VirtualServerResourceCPU describes the CPU request for the VirtualServer
func (*VirtualServerResourceCPU) DeepCopy ¶
func (in *VirtualServerResourceCPU) DeepCopy() *VirtualServerResourceCPU
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerResourceCPU.
func (*VirtualServerResourceCPU) DeepCopyInto ¶
func (in *VirtualServerResourceCPU) DeepCopyInto(out *VirtualServerResourceCPU)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerResourceGPU ¶
type VirtualServerResourceGPU struct { // Type is the GPU type to request // See Coreweave Metadata API for available GPU types Type *string `json:"type,omitempty"` // The number of GPUs to request. // +optional // +kubebuilder:validation:Minimum=1 Count *uint32 `json:"count,omitempty"` }
VirtualServerResourceGPU describes the GPU request for the VirtualServer
func (*VirtualServerResourceGPU) DeepCopy ¶
func (in *VirtualServerResourceGPU) DeepCopy() *VirtualServerResourceGPU
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerResourceGPU.
func (*VirtualServerResourceGPU) DeepCopyInto ¶
func (in *VirtualServerResourceGPU) DeepCopyInto(out *VirtualServerResourceGPU)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerResources ¶
type VirtualServerResources struct { // The resource configuration definition for internal use // See https://docs.coreweave.com/virtual-desktop for details on which definition value best suits your configuration. // Defaults to "a" // +optional // +kubebuilder:default=a Definition string `json:"definition,omitempty"` // GPU describes the GPU resource request // +optional GPU VirtualServerResourceGPU `json:"gpu,omitempty"` // CPU describes the CPU resource request // +optional // +kubebuilder:default={count: 2} CPU VirtualServerResourceCPU `json:"cpu,omitempty"` // Memory describes the memory resource request // +optional // +kubebuilder:default="8Gi" Memory resource.Quantity `json:"memory,omitempty"` }
VirtualServerResources defines the resources requested for the VirtualServer
func (*VirtualServerResources) DeepCopy ¶
func (in *VirtualServerResources) DeepCopy() *VirtualServerResources
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerResources.
func (*VirtualServerResources) DeepCopyInto ¶
func (in *VirtualServerResources) DeepCopyInto(out *VirtualServerResources)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerServiceTemplate ¶ added in v1.5.0
type VirtualServerServiceTemplate struct { // A list of ports. // The list is constrained to a maximum of 10 ports // +kubebuilder:validation:MaxItems=10 Ports []Port `json:"ports,omitempty"` }
VirtualServerServiceTemplate defines a service created by the VirtualServer
func (*VirtualServerServiceTemplate) DeepCopy ¶ added in v1.5.0
func (in *VirtualServerServiceTemplate) DeepCopy() *VirtualServerServiceTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerServiceTemplate.
func (*VirtualServerServiceTemplate) DeepCopyInto ¶ added in v1.5.0
func (in *VirtualServerServiceTemplate) DeepCopyInto(out *VirtualServerServiceTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerSpec ¶
type VirtualServerSpec struct { Region string `json:"region,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` OS VirtualServerOS `json:"os"` Resources VirtualServerResources `json:"resources"` Storage VirtualServerStorage `json:"storage"` // +optional LivenessProbe *kvv1.Probe `json:"livenessProbe,omitempty"` // +optional ReadinessProbe *kvv1.Probe `json:"readinessProbe,omitempty"` // +optional Users []VirtualServerUser `json:"users,omitempty"` // +optional Network VirtualServerNetwork `json:"network"` // +optional InitializeRunning bool `json:"initializeRunning,omitempty"` // +optional CloudInit string `json:"cloudInit,omitempty"` // +kubebuilder:validation:Enum=Always;RerunOnFailure;Manual;Halted RunStrategy *kvv1.VirtualMachineRunStrategy `json:"runStrategy,omitempty"` // +optional Firmware Firmware `json:"firmware,omitempty"` // +optional UseVirtioTransitional *bool `json:"useVirtioTransitional,omitempty"` TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` }
VirtualServerSpec defines the desired state of VirtualServer
func (*VirtualServerSpec) DeepCopy ¶
func (in *VirtualServerSpec) DeepCopy() *VirtualServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerSpec.
func (*VirtualServerSpec) DeepCopyInto ¶
func (in *VirtualServerSpec) DeepCopyInto(out *VirtualServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerStatus ¶
type VirtualServerStatus struct { Conditions []metav1.Condition `json:"conditions,omitempty"` Network VirtualServerNetworkStatus `json:"network,omitempty"` }
VirtualServerStatus defines the observed state of VirtualServer
func (*VirtualServerStatus) DeepCopy ¶
func (in *VirtualServerStatus) DeepCopy() *VirtualServerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerStatus.
func (*VirtualServerStatus) DeepCopyInto ¶
func (in *VirtualServerStatus) DeepCopyInto(out *VirtualServerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualServerStatus) ExternalIP ¶ added in v1.6.0
func (s *VirtualServerStatus) ExternalIP() string
func (*VirtualServerStatus) FloatingIPs ¶ added in v1.5.0
func (s *VirtualServerStatus) FloatingIPs() map[string]string
func (*VirtualServerStatus) InternalIP ¶ added in v1.5.0
func (s *VirtualServerStatus) InternalIP() string
type VirtualServerStorage ¶
type VirtualServerStorage struct { // Root describes the root filesystem of the VirtualServer Root VirtualServerStorageRoot `json:"root"` // AdditionalDisks is an array of disks devices added to the VirtualServer AdditionalDisks []VirtualServerDisks `json:"additionalDisks,omitempty"` // Filesystems is an array of filesystem mounted to the VirtualServer FileSystems []VirtualServerFilesystem `json:"filesystems,omitempty"` // Swap describes a swap volume of the specified size added to the VirtualServer // An emptyDisk is created of the specified size to be used as the swap disk Swap *resource.Quantity `json:"swap,omitempty"` }
VirtualServerStorage describes the Storage request for the VirtualServer
func (*VirtualServerStorage) DeepCopy ¶
func (in *VirtualServerStorage) DeepCopy() *VirtualServerStorage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerStorage.
func (*VirtualServerStorage) DeepCopyInto ¶
func (in *VirtualServerStorage) DeepCopyInto(out *VirtualServerStorage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerStorageRoot ¶
type VirtualServerStorageRoot struct { // Size specifies the root filesystem volume size Size resource.Quantity `json:"size"` // Source describes the DataVolumeSource for the root filesystem DataVolume // A DataVolume will be dynamically created alongside the VirtualServer, and the underlying PVC will be mounted as the root filesystem Source *cdiv1beta.DataVolumeSource `json:"source"` // StorageClassName specifies the StorageClassName of the root filesystem PVC StorageClassName string `json:"storageClassName"` // VolumeMode specifies the VolumeMode of the root filesystem PVC. // Defaults to Block // +kubebuilder:default=Block // +optional VolumeMode corev1.PersistentVolumeMode `json:"volumeMode,omitempty"` // AccessMode specifies the AccessMode of the root filesystem PVC. // Defaults to ReadWriteOnce // +kubebuilder:default=ReadWriteOnce // +optional AccessMode corev1.PersistentVolumeAccessMode `json:"accessMode,omitempty"` // Ephemeral, if true, will disable disk persistence for the root filesystem. // A local image will be used to write changes, and will be discared when the Virtual Server is stopped or restarted. // Only a PVC source may be specified Ephemeral bool `json:"ephemeral,omitempty"` // Disk serial number // +optional Serial string `json:"serial,omitempty"` }
VirtualServerStorageRoot describes the Storage request for root filesystem of the VirtualServer
func (*VirtualServerStorageRoot) DeepCopy ¶
func (in *VirtualServerStorageRoot) DeepCopy() *VirtualServerStorageRoot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerStorageRoot.
func (*VirtualServerStorageRoot) DeepCopyInto ¶
func (in *VirtualServerStorageRoot) DeepCopyInto(out *VirtualServerStorageRoot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerStorageRootHTTPSource ¶
type VirtualServerStorageRootHTTPSource struct { Size string ImageUrl string StorageClassName string VolumeMode corev1.PersistentVolumeMode AccessMode corev1.PersistentVolumeAccessMode }
func (*VirtualServerStorageRootHTTPSource) DeepCopy ¶
func (in *VirtualServerStorageRootHTTPSource) DeepCopy() *VirtualServerStorageRootHTTPSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerStorageRootHTTPSource.
func (*VirtualServerStorageRootHTTPSource) DeepCopyInto ¶
func (in *VirtualServerStorageRootHTTPSource) DeepCopyInto(out *VirtualServerStorageRootHTTPSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerStorageRootPVCSource ¶
type VirtualServerStorageRootPVCSource struct { Size string PVCName string PVCNamespace string StorageClassName string VolumeMode corev1.PersistentVolumeMode AccessMode corev1.PersistentVolumeAccessMode }
func (*VirtualServerStorageRootPVCSource) DeepCopy ¶
func (in *VirtualServerStorageRootPVCSource) DeepCopy() *VirtualServerStorageRootPVCSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerStorageRootPVCSource.
func (*VirtualServerStorageRootPVCSource) DeepCopyInto ¶
func (in *VirtualServerStorageRootPVCSource) DeepCopyInto(out *VirtualServerStorageRootPVCSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerStorageVolume ¶
type VirtualServerStorageVolume struct { Name string `json:"name"` Spec kvv1.VolumeSource `json:"spec"` }
VirtualServerStorageVolume describes a named volume in the VirtualServer
func (*VirtualServerStorageVolume) DeepCopy ¶
func (in *VirtualServerStorageVolume) DeepCopy() *VirtualServerStorageVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerStorageVolume.
func (*VirtualServerStorageVolume) DeepCopyInto ¶
func (in *VirtualServerStorageVolume) DeepCopyInto(out *VirtualServerStorageVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VirtualServerUser ¶
type VirtualServerUser struct { Username string `json:"username"` Password string `json:"password,omitempty"` SSHPublicKey string `json:"sshpublickey,omitempty"` }
VirtualServerUser defines user login information in the VirtualServer The user login information will be used to configure the VirtualServer via cloudinit if supported
func (*VirtualServerUser) DeepCopy ¶
func (in *VirtualServerUser) DeepCopy() *VirtualServerUser
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerUser.
func (*VirtualServerUser) DeepCopyInto ¶
func (in *VirtualServerUser) DeepCopyInto(out *VirtualServerUser)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VirtualServerUser) GetSize ¶ added in v1.12.0
func (vsu *VirtualServerUser) GetSize() int
GetSize returns total size of fields in VirtualServerUser struct
type VirtualServerVPC ¶ added in v1.27.0
type VirtualServerVPC struct {
Name string `json:"name"`
}
VirtualServerVPC defines a VPC network for the Virtual Server to join
func (*VirtualServerVPC) DeepCopy ¶ added in v1.27.0
func (in *VirtualServerVPC) DeepCopy() *VirtualServerVPC
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServerVPC.
func (*VirtualServerVPC) DeepCopyInto ¶ added in v1.27.0
func (in *VirtualServerVPC) DeepCopyInto(out *VirtualServerVPC)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.