Skip to content

Commit f56078b

Browse files
committed
feat: adds GPU types to API
1 parent dd6e9a0 commit f56078b

File tree

4 files changed

+97
-0
lines changed

4 files changed

+97
-0
lines changed

api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,29 @@ spec:
254254
required:
255255
- type
256256
type: object
257+
gpus:
258+
description: List of GPU devices that need to be added
259+
to the machines.
260+
items:
261+
properties:
262+
deviceID:
263+
description: deviceID is the id of the GPU entity.
264+
format: int64
265+
type: integer
266+
name:
267+
description: name is the GPU name
268+
type: string
269+
type:
270+
description: Type is the identifier type to use
271+
for this resource.
272+
enum:
273+
- deviceID
274+
- name
275+
type: string
276+
required:
277+
- type
278+
type: object
279+
type: array
257280
image:
258281
description: |-
259282
image identifies the image uploaded to Prism Central (PC). The identifier

api/v1alpha1/crds/caren.nutanix.com_nutanixnodeconfigs.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,29 @@ spec:
8888
required:
8989
- type
9090
type: object
91+
gpus:
92+
description: List of GPU devices that need to be added to
93+
the machines.
94+
items:
95+
properties:
96+
deviceID:
97+
description: deviceID is the id of the GPU entity.
98+
format: int64
99+
type: integer
100+
name:
101+
description: name is the GPU name
102+
type: string
103+
type:
104+
description: Type is the identifier type to use for
105+
this resource.
106+
enum:
107+
- deviceID
108+
- name
109+
type: string
110+
required:
111+
- type
112+
type: object
113+
type: array
91114
image:
92115
description: |-
93116
image identifies the image uploaded to Prism Central (PC). The identifier

api/v1alpha1/nutanix_node_types.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,25 @@ type NutanixMachineDetails struct {
5151
// The project must already be present in the Prism Central.
5252
// +optional
5353
Project *NutanixResourceIdentifier `json:"project,omitempty"`
54+
55+
// List of GPU devices that need to be added to the machines.
56+
// +kubebuilder:validation:Optional
57+
GPUs []NutanixGPU `json:"gpus,omitempty"`
58+
}
59+
60+
type NutanixGPU struct {
61+
// Type is the identifier type to use for this resource.
62+
// +kubebuilder:validation:Required
63+
// +kubebuilder:validation:Enum:=deviceID;name
64+
Type string `json:"type"`
65+
66+
// deviceID is the id of the GPU entity.
67+
// +optional
68+
DeviceID *int64 `json:"deviceID,omitempty"`
69+
70+
// name is the GPU name
71+
// +optional
72+
Name *string `json:"name,omitempty"`
5473
}
5574

5675
// NutanixIdentifierType is an enumeration of different resource identifier types.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)