Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/v1beta1/azurestackhcimachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ type AzureStackHCIMachineSpec struct {

GpuCount int32 `json:"gpuCount,omitempty"`

// VM cpu/memory/GPU details when VM size type is custom
// +optional
CustomSize VirtualMachineCustomSize `json:"customSize,omitempty"`

// AllocatePublicIP allows the ability to create dynamic public ips for machines where this value is true.
// +optional
AllocatePublicIP bool `json:"allocatePublicIP,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions api/v1beta1/azurestackhcivirtualmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ type AzureStackHCIVirtualMachineSpec struct {
// if not specified, it's a vm without gpu
GpuCount int32 `json:"gpuCount,omitempty"`

// VM cpu/memory/GPU details when VM size type is custom
// +optional
CustomSize VirtualMachineCustomSize `json:"customSize,omitempty"`

// come from the cluster scope for machine and lb controller creation path
ResourceGroup string `json:"resourceGroup"`
VnetName string `json:"vnetName"`
Expand Down
26 changes: 26 additions & 0 deletions api/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,32 @@ type AvailabilityZone struct {
Enabled *bool `json:"enabled,omitempty"`
}

// VirtualMachineCustomSize specifies cpu/memory/gpu information for custom VMSize types.
type VirtualMachineCustomSize struct {
CpuCount *int32 `json:"cpucount,omitempty"`
MemoryMB *int32 `json:"memorymb,omitempty"`
Assignment *GpuAssignment `json:"assignment,omitempty"`
PartitionSizeMB *uint64 `json:"partitionSizeMB,omitempty"`
GpuName *string `json:"gpuName,omitempty"`
GpuDriver *string `json:"gpuDriver,omitempty"`
MMIORegion *GpuMemoryMappedIORegion `json:"mmioRegion,omitempty"`
}

type GpuAssignment string

// possible values of gpu assignment
const (
GpuDDA GpuAssignment = "GpuDDA"
GpuP GpuAssignment = "GpuP"
GpuPV GpuAssignment = "GpuPV"
GpuDefault GpuAssignment = "GpuDefault"
)

type GpuMemoryMappedIORegion struct {
Low *uint64 `json:"low,omitempty"`
High *uint64 `json:"high,omitempty"`
}

// VMIdentity defines the identity of the virtual machine, if configured.
type VMIdentity string

Expand Down
77 changes: 77 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,34 @@ spec:
id:
type: string
type: object
customSize:
description: VM cpu/memory/GPU details when VM size type is custom
properties:
assignment:
type: string
cpucount:
format: int32
type: integer
gpuDriver:
type: string
gpuName:
type: string
memorymb:
format: int32
type: integer
mmioRegion:
properties:
high:
format: int64
type: integer
low:
format: int64
type: integer
type: object
partitionSizeMB:
format: int64
type: integer
type: object
gpuCount:
format: int32
type: integer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,35 @@ spec:
id:
type: string
type: object
customSize:
description: VM cpu/memory/GPU details when VM size type is
custom
properties:
assignment:
type: string
cpucount:
format: int32
type: integer
gpuDriver:
type: string
gpuName:
type: string
memorymb:
format: int32
type: integer
mmioRegion:
properties:
high:
format: int64
type: integer
low:
format: int64
type: integer
type: object
partitionSizeMB:
format: int64
type: integer
type: object
gpuCount:
format: int32
type: integer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,34 @@ spec:
type: string
clusterName:
type: string
customSize:
description: VM cpu/memory/GPU details when VM size type is custom
properties:
assignment:
type: string
cpucount:
format: int32
type: integer
gpuDriver:
type: string
gpuName:
type: string
memorymb:
format: int32
type: integer
mmioRegion:
properties:
high:
format: int64
type: integer
low:
format: int64
type: integer
type: object
partitionSizeMB:
format: int64
type: integer
type: object
gpuCount:
description: if not specified, it's a vm without gpu
format: int32
Expand Down