From c44f8214dbd6072416acf3b3ad405838ccf4e93c Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Wed, 11 Nov 2020 10:30:58 +0100 Subject: [PATCH] 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 --- .../k8s.io/kubelet/pkg/apis/podresources/v1/api.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto index cd8dbeaf957..a05c5fd5605 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto @@ -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