@@ -74,7 +74,7 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
74
74
## Summary
75
75
76
76
This proposal enhances the ` ResourceClaim.Status ` by adding a new field
77
- ` DeviceStatuses ` . The new field allows drivers to report driver-specific device
77
+ ` Devices ` . The new field allows drivers to report driver-specific device
78
78
status data for each allocated device in a resource claim. Allowing the
79
79
drivers to report the device statuses will improve both observability and
80
80
troubleshooting as well as enabling new functionalities such as, for example,
@@ -120,28 +120,28 @@ reported).
120
120
121
121
### API - ResourceClaim.Status
122
122
123
- The API changes define a new ` DeviceStatuses ` field in the existing
124
- ` ResourceClaimStatus ` struct. ` DeviceStatuses ` is a slice of a new struct
123
+ The API changes define a new ` Devices ` field in the existing
124
+ ` ResourceClaimStatus ` struct. ` Devices ` is a slice of a new struct
125
125
` AllocatedDeviceStatus ` which holds device specific information.
126
126
127
127
A device, identified by ` <driver name>/<pool name>/<device name> ` can be
128
- represented only once in the ` DeviceStatuses ` slice and will also mention which
128
+ represented only once in the ` Devices ` slice and will also mention which
129
129
request caused the device to be allocated. The state and characteristics of the
130
130
device are reported in the ` Conditions ` , representing the operational state of
131
- the device and in the ` DeviceInfo ` , an arbitrary data slice representing device
131
+ the device and in the ` Info ` , an arbitrary data slice representing device
132
132
specific characteristics. Additionally, for networking devices, a field
133
- ` NetworkDeviceInfo ` can be used to report the IPs, the MAC address and the
133
+ ` NetworkInfo ` can be used to report the IPs, the MAC address and the
134
134
interface name.
135
135
136
- ` DeviceInfo ` being a slice of arbitrary data allows the DRA Driver to store
136
+ ` Info ` being a slice of arbitrary data allows the DRA Driver to store
137
137
device specific data in different formats. For example, a Network Device being
138
- configured by via a CNI plugin could get its ` DeviceInfo ` filled with the CNI
138
+ configured by via a CNI plugin could get its ` Info ` filled with the CNI
139
139
result for troubleshooting purpose and with a Network result in a modern
140
140
standard format (closer to Pod.Status.PodIPs for example) used by 3rd party
141
141
controllers.
142
142
143
143
For each device, if required, the DRA Driver processing the device allocation
144
- can report the status of it in the ` Status.DeviceStatuses ` of the ResourceClaim
144
+ can report the status of it in the ` Status.Devices ` of the ResourceClaim
145
145
by using the Kubernetes API.
146
146
147
147
``` golang
@@ -150,7 +150,7 @@ by using the Kubernetes API.
150
150
type ResourceClaimStatus struct {
151
151
...
152
152
153
- // DeviceStatuses contains the status of each device allocated for this
153
+ // Devices contains the status of each device allocated for this
154
154
// claim, as reported by the driver. This can include driver-specific
155
155
// information. Entries are owned by their respective drivers.
156
156
//
@@ -159,10 +159,9 @@ type ResourceClaimStatus struct {
159
159
// +listMapKey=driver
160
160
// +listMapKey=device
161
161
// +listMapKey=pool
162
- DeviceStatuses []AllocatedDeviceStatus ` json:"deviceStatuses ,omitempty" protobuf:"bytes,4,opt,name=deviceStatuses "`
162
+ Devices []AllocatedDeviceStatus ` json:"devices ,omitempty" protobuf:"bytes,4,opt,name=devices "`
163
163
}
164
164
165
-
166
165
// AllocatedDeviceStatus contains the status of an allocated device, if the
167
166
// driver chooses to report it. This may include driver-specific information.
168
167
type AllocatedDeviceStatus struct {
@@ -199,39 +198,40 @@ type AllocatedDeviceStatus struct {
199
198
// +listType=atomic
200
199
Conditions []metav1.Condition ` json:"conditions" protobuf:"bytes,5,rep,name=conditions"`
201
200
202
- // DeviceInfo contains arbitrary driver-specific data.
201
+ // Info contains arbitrary driver-specific data.
203
202
//
204
203
// +optional
205
204
// +listType=atomic
206
- DeviceInfo []runtime.RawExtension ` json:"deviceInfo ,omitempty" protobuf:"bytes,6,rep,name=deviceInfo "`
205
+ Info []runtime.RawExtension ` json:"info ,omitempty" protobuf:"bytes,6,rep,name=info "`
207
206
208
- // NetworkDeviceInfo contains network-related information specific to the device.
207
+ // NetworkInfo contains network-related information specific to the device.
209
208
//
210
209
// +optional
211
- NetworkDeviceInfo NetworkDeviceInfo ` json:"networkDeviceInfo,omitempty" protobuf:"bytes,7,rep,name=networkDeviceInfo"`
210
+ // +oneOf=DeviceInfoType
211
+ NetworkInfo NetworkDeviceInfo ` json:"networkInfo,omitempty" protobuf:"bytes,7,rep,name=networkInfo"`
212
212
}
213
213
214
214
// NetworkDeviceInfo provides network-related details for the allocated device.
215
215
// This information may be filled by drivers or other components to configure
216
216
// or identify the device within a network context.
217
217
type NetworkDeviceInfo struct {
218
- // Interface specifies the name of the network interface associated with
218
+ // InterfaceName specifies the name of the network interface associated with
219
219
// the allocated device. This might be the name of a physical or virtual
220
220
// network interface.
221
221
//
222
222
// +optional
223
- Interface string ` json:"interface ,omitempty" protobuf:"bytes,1,rep,name=interface "`
223
+ InterfaceName string ` json:"interfaceName ,omitempty" protobuf:"bytes,1,rep,name=interfaceName "`
224
224
225
- // NetworkAddresses lists the network addresses assigned to the device's network interface.
225
+ // Addresses lists the network addresses assigned to the device's network interface.
226
226
// This can include both IPv4 and IPv6 addresses.
227
227
//
228
228
// +optional
229
- NetworkAddresses []NetworkAddress ` json:"networkAddresses ,omitempty" protobuf:"bytes,2,rep,name=networkAddresses "`
229
+ Addresses []NetworkAddress ` json:"addresses ,omitempty" protobuf:"bytes,2,rep,name=addresses "`
230
230
231
- // Mac represents the MAC address of the device's network interface.
231
+ // HWAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
232
232
//
233
233
// +optional
234
- Mac string ` json:"mac ,omitempty" protobuf:"bytes,3,rep,name=mac "`
234
+ HWAddress string ` json:"hwAddress ,omitempty" protobuf:"bytes,3,rep,name=hwAddress "`
235
235
}
236
236
237
237
// NetworkAddress provides a network address related details such as IP and Mask.
@@ -262,15 +262,15 @@ them.
262
262
263
263
As a Network Administrator, troubleshooting networking issues can be complex
264
264
and time consuming especially when the device characteristics and operational
265
- status are not readily accessible. The ` DeviceStatuses ` field in the
265
+ status are not readily accessible. The ` Devices ` field in the
266
266
` ResourceClaim.Status ` provides access to comprehensive details regarding
267
267
network interfaces helping to quickly and efficiently identify the issues such
268
268
as error messages on failed network interface configuration, incorrect IP
269
269
assignments or misconfigured network interfaces.
270
270
271
271
### Notes/Constraints/Caveats (Optional)
272
272
273
- The content of ` DeviceInfo ` is driver specific and not standardized as part of
273
+ The content of ` Info ` is driver specific and not standardized as part of
274
274
DRA, the interpretation of this field may then vary between controllers and
275
275
users reading it.
276
276
@@ -280,12 +280,12 @@ changes of the state of the device.
280
280
281
281
### Risks and Mitigations
282
282
283
- As stated, 3rd party DRA drivers will set and update the ` DeviceStatuses ` for
283
+ As stated, 3rd party DRA drivers will set and update the ` Devices ` for
284
284
the device they manage. An access control must be set in place to restrict the
285
285
write access to the appropriate driver (A device status can only be updated by
286
286
the driver which allocated and configured this device).
287
287
288
- Adding ` DeviceInfo ` as an arbitrary data slice may introduce extra processing
288
+ Adding ` Info ` as an arbitrary data slice may introduce extra processing
289
289
and storage overhead which might impact performance in a cluster with many
290
290
devices and frequent status updates. In large-scale clusters where many devices
291
291
are allocated, this impact must be considered.
@@ -295,7 +295,7 @@ are allocated, this impact must be considered.
295
295
### API
296
296
297
297
The ` ResourceClaimStatus ` struct in ` pkg/apis/resource/types.go ` will be
298
- extended to include the slice of ` DeviceStatuses ` .
298
+ extended to include the slice of ` Devices ` .
299
299
300
300
` ResourceClaim ` validation of the status in
301
301
` pkg/apis/resource/validation/validation.go ` will be covered to allow a device
@@ -319,7 +319,7 @@ to implement this enhancement.
319
319
320
320
##### Integration tests
321
321
322
- - Usage of the ` DeviceStatuses ` field in the ` ResourceClaimStatus ` :
322
+ - Usage of the ` Devices ` field in the ` ResourceClaimStatus ` :
323
323
* With the feature gate enabled, the field exists in the ` ResourceClaim ` .
324
324
* With the feature gate disabled, the field does not exist in the
325
325
` ResourceClaim ` .
332
332
333
333
#### Alpha
334
334
335
- - Feature implemented behind feature gates (` ResourceClaimDeviceStatus ` ).
335
+ - Feature implemented behind feature gates (` DRAResourceClaimDeviceStatus ` ).
336
336
Feature Gates are disabled by default.
337
337
- Documentation provided.
338
338
- Initial unit, integration and e2e tests completed and enabled.
@@ -371,7 +371,7 @@ skew with other Kubernetes components.
371
371
###### How can this feature be enabled / disabled in a live cluster?
372
372
373
373
- [x] Feature gate (also fill in values in ` kep.yaml ` )
374
- - Feature gate name: ResourceClaimDeviceStatus
374
+ - Feature gate name: DRAResourceClaimDeviceStatus
375
375
- Components depending on the feature gate: kube-apiserver
376
376
- [ ] Other
377
377
- Describe the mechanism:
421
421
422
422
###### How can an operator determine if the feature is in use by workloads?
423
423
424
- Check the ` ResourceClaim.Status.DeviceStatuses ` .
424
+ Check the ` ResourceClaim.Status.Devices ` .
425
425
426
426
###### How can someone using this feature know that it is working for their instance?
427
427
428
428
- [ ] Events
429
429
- Event Reason:
430
430
- [x] API .status
431
431
- Condition name:
432
- - Other field: ` ResourceClaim.Status.DeviceStatuses `
432
+ - Other field: ` ResourceClaim.Status.Devices `
433
433
- [ ] Other (treat as last resort)
434
434
- Details:
435
435
487
487
488
488
###### Will enabling / using this feature result in non-negligible increase of resource usage (CPU, RAM, disk, IO, ...) in any components?
489
489
490
- Depending on the content of the ` DeviceInfo ` set by the DRA drivers, the disk
490
+ Depending on the content of the ` Info ` set by the DRA drivers, the disk
491
491
usage could increase.
492
492
493
493
###### Can enabling / using this feature result in resource exhaustion of some node resources (PIDs, sockets, inodes, etc.)?
0 commit comments