node: podresources: add GetAllocatableResources API

Extend the podresources API adding the GetAllocatableResources endpoint,
as specified in the KEP
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2043-pod-resource-concrete-assigments

Signed-off-by: Francesco Romani <fromani@redhat.com>
This commit is contained in:
Francesco Romani 2020-11-11 10:30:58 +01:00
parent 1375c5bdc7
commit c44f8214db

View File

@ -18,6 +18,15 @@ option (gogoproto.goproto_unrecognized_all) = false;
// node resources consumed by pods and containers on the node
service PodResourcesLister {
rpc List(ListPodResourcesRequest) returns (ListPodResourcesResponse) {}
rpc GetAllocatableResources(AllocatableResourcesRequest) returns (AllocatableResourcesResponse) {}
}
message AllocatableResourcesRequest {}
// AllocatableResourcesResponses contains informations about all the devices known by the kubelet
message AllocatableResourcesResponse {
repeated ContainerDevices devices = 1;
repeated int64 cpu_ids = 2;
}
// ListPodResourcesRequest is the request made to the PodResourcesLister service