@@ -88,32 +88,69 @@ And show the initial state of available GPU devices on the worker node:
88
88
$ kubectl get resourceslice -o yaml
89
89
apiVersion: v1
90
90
items:
91
- - apiVersion: resource.k8s.io/v1alpha2
92
- driverName: gpu.resource.example.com
91
+ - apiVersion: resource.k8s.io/v1alpha3
93
92
kind: ResourceSlice
94
93
metadata:
95
- creationTimestamp: "2024-04-17T13:45:44Z"
96
- generateName: dra-example-driver-cluster-worker-gpu.resource.example.com-
97
- name: dra-example-driver-cluster-worker-gpu.resource.example.comxktph
94
+ creationTimestamp: "2024-07-13T01:10:56Z"
95
+ generateName: dra-example-driver-cluster-worker-gpu.example.com-
96
+ generation: 1
97
+ name: dra-example-driver-cluster-worker-gpu.example.com-vkx6z
98
98
ownerReferences:
99
99
- apiVersion: v1
100
100
controller: true
101
101
kind: Node
102
102
name: dra-example-driver-cluster-worker
103
- uid: 4dc7c3b2-d99c-492b-8ede-37d435e56b2d
104
- resourceVersion: "1189"
105
- uid: 61c965b5-54a9-40ee-88a1-c52a814fa624
106
- namedResources:
107
- instances:
108
- - name: gpu-0159f35e-99ee-b2b5-74f1-9d18df3f22ac
109
- - name: gpu-657bd2e7-f5c2-a7f2-fbaa-0d1cdc32f81b
110
- - name: gpu-18db0e85-99e9-c746-8531-ffeb86328b39
111
- - name: gpu-93d37703-997c-c46f-a531-755e3e0dc2ac
112
- - name: gpu-ee3e4b55-fcda-44b8-0605-64b7a9967744
113
- - name: gpu-9ede7e32-5825-a11b-fa3d-bab6d47e0243
114
- - name: gpu-e7b42cb1-4fd8-91b2-bc77-352a0c1f5747
115
- - name: gpu-f11773a1-5bfb-e48b-3d98-1beb5baaf08e
116
- nodeName: dra-example-driver-cluster-worker
103
+ uid: fe806a5b-17a3-42d6-a9bc-fc8ad7609a1a
104
+ resourceVersion: "523"
105
+ uid: 7a61895f-f5d6-4679-a68c-7ae3c148c9cb
106
+ spec:
107
+ driver: gpu.example.com
108
+ nodeName: dra-example-driver-cluster-worker
109
+ pool:
110
+ generation: 0
111
+ name: dra-example-driver-cluster-worker
112
+ resourceSliceCount: 1
113
+ devices:
114
+ - basic:
115
+ attributes:
116
+ model:
117
+ string: LATEST-GPU-MODEL
118
+ name: gpu-e7b42cb1-4fd8-91b2-bc77-352a0c1f5747
119
+ - basic:
120
+ attributes:
121
+ model:
122
+ string: LATEST-GPU-MODEL
123
+ name: gpu-f11773a1-5bfb-e48b-3d98-1beb5baaf08e
124
+ - basic:
125
+ attributes:
126
+ model:
127
+ string: LATEST-GPU-MODEL
128
+ name: gpu-0159f35e-99ee-b2b5-74f1-9d18df3f22ac
129
+ - basic:
130
+ attributes:
131
+ model:
132
+ string: LATEST-GPU-MODEL
133
+ name: gpu-657bd2e7-f5c2-a7f2-fbaa-0d1cdc32f81b
134
+ - basic:
135
+ attributes:
136
+ model:
137
+ string: LATEST-GPU-MODEL
138
+ name: gpu-18db0e85-99e9-c746-8531-ffeb86328b39
139
+ - basic:
140
+ attributes:
141
+ model:
142
+ string: LATEST-GPU-MODEL
143
+ name: gpu-93d37703-997c-c46f-a531-755e3e0dc2ac
144
+ - basic:
145
+ attributes:
146
+ model:
147
+ string: LATEST-GPU-MODEL
148
+ name: gpu-ee3e4b55-fcda-44b8-0605-64b7a9967744
149
+ - basic:
150
+ attributes:
151
+ model:
152
+ string: LATEST-GPU-MODEL
153
+ name: gpu-9ede7e32-5825-a11b-fa3d-bab6d47e0243
117
154
kind: List
118
155
metadata:
119
156
resourceVersion: ""
@@ -165,28 +202,28 @@ This should produce output similar to the following:
165
202
``` bash
166
203
gpu-test1:
167
204
pod0 ctr0:
168
- declare -x GPU_DEVICE_0=" GPU-657bd2e7-f5c2-a7f2-fbaa-0d1cdc32f81b "
205
+ declare -x GPU_DEVICE_0=" gpu-e7b42cb1-4fd8-91b2-bc77-352a0c1f5747 "
169
206
pod1 ctr0:
170
- declare -x GPU_DEVICE_0=" GPU-ee3e4b55-fcda-44b8-0605-64b7a9967744 "
207
+ declare -x GPU_DEVICE_0=" gpu-f11773a1-5bfb-e48b-3d98-1beb5baaf08e "
171
208
172
209
gpu-test2:
173
210
pod0 ctr0:
174
- declare -x GPU_DEVICE_0=" GPU-9ede7e32-5825-a11b-fa3d-bab6d47e0243 "
211
+ declare -x GPU_DEVICE_0=" gpu-0159f35e-99ee-b2b5-74f1-9d18df3f22ac "
175
212
pod0 ctr1:
176
- declare -x GPU_DEVICE_0=" GPU-9ede7e32-5825-a11b-fa3d-bab6d47e0243 "
213
+ declare -x GPU_DEVICE_0=" gpu-0159f35e-99ee-b2b5-74f1-9d18df3f22ac "
177
214
178
215
gpu-test3:
179
216
pod0 ctr0:
180
- declare -x GPU_DEVICE_0=" GPU-93d37703-997c-c46f-a531-755e3e0dc2ac "
217
+ declare -x GPU_DEVICE_0=" gpu-657bd2e7-f5c2-a7f2-fbaa-0d1cdc32f81b "
181
218
pod1 ctr0:
182
- declare -x GPU_DEVICE_0=" GPU-93d37703-997c-c46f-a531-755e3e0dc2ac "
219
+ declare -x GPU_DEVICE_0=" gpu-657bd2e7-f5c2-a7f2-fbaa-0d1cdc32f81b "
183
220
184
221
gpu-test4:
185
222
pod0 ctr0:
186
- declare -x GPU_DEVICE_0=" GPU -18db0e85-99e9-c746-8531-ffeb86328b39"
187
- declare -x GPU_DEVICE_1=" GPU-e7b42cb1-4fd8-91b2-bc77-352a0c1f5747 "
188
- declare -x GPU_DEVICE_2=" GPU-f11773a1-5bfb-e48b-3d98-1beb5baaf08e "
189
- declare -x GPU_DEVICE_3=" GPU-0159f35e-99ee-b2b5-74f1-9d18df3f22ac "
223
+ declare -x GPU_DEVICE_0=" gpu -18db0e85-99e9-c746-8531-ffeb86328b39"
224
+ declare -x GPU_DEVICE_1=" gpu-93d37703-997c-c46f-a531-755e3e0dc2ac "
225
+ declare -x GPU_DEVICE_2=" gpu-ee3e4b55-fcda-44b8-0605-64b7a9967744 "
226
+ declare -x GPU_DEVICE_3=" gpu-9ede7e32-5825-a11b-fa3d-bab6d47e0243 "
190
227
```
191
228
192
229
In this example resource driver, no "actual" GPUs are made available to any
0 commit comments