@@ -97,7 +97,9 @@ This API is read-only, which removes a large class of risks. The aspects that we
97
97
Our proposal is to extend the existing PodResources gRPC service of the Kubelet
98
98
with a repeated ` DynamicResource ` field in the ContainerResources message. This
99
99
new field will contain information about the DRA resource class, the DRA
100
- resource claim, and a list of CDI Devices allocated by a DRA driver.
100
+ claim name, claim namespace, and a list of claimed resources allocated by a DRA driver.
101
+ Currently, the claim resources only contain a list of CDI Devices but in the future they
102
+ may be extended to support plugins that allocate different types of resource (not just CDI Devices).
101
103
Additionally, we propose adding a ` Get() ` method to the existing gRPC service
102
104
to allow querying specific pods for their allocated resources.
103
105
@@ -178,7 +180,13 @@ message NUMANode {
178
180
message DynamicResource {
179
181
string class_name = 1;
180
182
string claim_name = 2;
181
- repeated CDIDevice cdi_devices = 3;
183
+ string claim_namespace = 3;
184
+ repeated ClaimResource claim_resources = 4;
185
+ }
186
+
187
+ // ClaimResource contains per plugin resource information
188
+ message ClaimResource {
189
+ repeated CDIDevice cdi_devices = 1 [(gogoproto.customname) = "CDIDevices"];
182
190
}
183
191
184
192
// CDIDevice specifies a CDI device information
@@ -290,17 +298,17 @@ Kubelet will always be backwards compatible, so going forward existing plugins a
290
298
enable / disable DRA feature.
291
299
- Components depending on the feature gate: kube-apiserver, kube-controller-manager,
292
300
kube-scheduler, kubelet
293
- - Feature gate name: ` PodResourcesDynamicResources ` new feature gate to
301
+ - Feature gate name: ` KubeletPodResourcesDynamicResources ` new feature gate to
294
302
enable / disable PodResources API List method to populate ` DynamicResource `
295
303
information from the ` DRAManager ` .
296
304
` DynamicResourceAllocation ` feature gate has to be enabled as well.
297
305
- Components depending on the feature gate: kubelet, 3rd party consumers.
298
- - Feature gate name: ` PodResourcesGet ` new feature gate to enable / disable
306
+ - Feature gate name: ` KubeletPodResourcesGet ` new feature gate to enable / disable
299
307
PodResources API Get method. In case ` DynamicResourceAllocation ` or
300
- the ` PodResourcesDynamicResources ` are disabled and ` PodResourcesGet `
308
+ the ` KubeletPodResourcesDynamicResources ` are disabled and ` KubeletPodResourcesGet `
301
309
is enabled, the Get method will retrieve resources allocated by device plugins,
302
310
memory and cpus (but omit those allocated by DRA resource drivers).
303
- In case ` PodResourcesGet ` , ` DynamicResourceAllocation ` and ` PodResourcesDynamicResources `
311
+ In case ` KubeletPodResourcesGet ` , ` DynamicResourceAllocation ` and ` KubeletPodResourcesDynamicResources `
304
312
are all enabled, the ` Get() ` method will also retrieve the resources allocated via DRA.
305
313
- Components depending on the feature gate: kubelet, 3rd party consumers.
306
314
@@ -328,7 +336,7 @@ Kubelet may fail to start. The new API may report inconsistent data, or may caus
328
336
329
337
###### What specific metrics should inform a rollback?
330
338
331
- ` pod_resources_endpoint_errors_get ` - but only with feature gate ` PodResourcesGet ` enabled. Otherwise the API will always return a known error.
339
+ ` pod_resources_endpoint_errors_get ` - but only with feature gate ` KubeletPodResourcesGet ` enabled. Otherwise the API will always return a known error.
332
340
333
341
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
334
342
0 commit comments