Skip to content

Commit 4571475

Browse files
authored
Merge pull request kubernetes#2115 from fromanirh/podresources-concrete-assignments-clarifications
doc: clarify the usage of GetAllocatableResources
2 parents 607e9fc + 91d924c commit 4571475

File tree

1 file changed

+9
-1
lines changed
  • keps/sig-node/2043-pod-resource-concrete-assigments

1 file changed

+9
-1
lines changed

keps/sig-node/2043-pod-resource-concrete-assigments/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ This gRPC service returns information about
113113
- the devices which kubelet knows about from the device plugins.
114114
- the kubelet's assignment of devices and cpus with NUMA id to containers.
115115
The GRPC service obtains this information from the internal state of the kubelet's Device Manager and CPU Manager respectively.
116-
The GRPC Service exposes two endpoints:
116+
The GRPC Service exposes these endpoints:
117117
- `List`, which returns a single PodResourcesResponse, enabling monitor applications to poll for resources allocated to pods and containers on the node.
118+
- `GetAllocatableResources`, which returns AllocatableResourcesResponse, enabling monitor applications to learn about the the allocatable resources available on the node.
118119
- `Watch`, which returns a stream of PodResourcesResponse, enabling monitor applications to be notified of new resource allocation, release or resource allocation updates, using the `action` field in the response.
119120

120121
This is shown in proto below:
@@ -236,6 +237,13 @@ Consider the following scenario with 10 devices, all allocated: pod A with devic
236237
pod B starts and gets device D1 again. In this case `Watch` will guarantee that `DELETE` and `ADDED` events are delivered
237238
in the correct order.
238239

240+
To properly evaluate the amount of allocatable compute resources on a node, client applications can use the `GetAlloctableResources` endpoint.
241+
Applications can use `List` and `Watch` to learn about the current allocation of these resources, and thus the current amount of free (unallocated)
242+
compute resources.
243+
Applications are expected to run `GetAlloctableResources` each time they expect a change in the resources
244+
availability (e.g. CPUs onlined/offlined, devices added/removed). We anticipate these changes to happen very rarely.
245+
Client applications should not expect any ordering in the return value.
246+
239247
### Test Plan
240248

241249
Given that the API allows observing what device has been associated to what container, we need to be testing different configurations, such as:

0 commit comments

Comments
 (0)