mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
add kubelet pod-resources API definition
This commit is contained in:
parent
076adbf4a2
commit
3ece501f6b
48
pkg/kubelet/apis/podresources/v1alpha1/api.proto
Normal file
48
pkg/kubelet/apis/podresources/v1alpha1/api.proto
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
// To regenerate api.pb.go run hack/update-generated-pod-resources.sh
|
||||||
|
syntax = 'proto3';
|
||||||
|
|
||||||
|
package v1alpha1;
|
||||||
|
|
||||||
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
option (gogoproto.goproto_stringer_all) = false;
|
||||||
|
option (gogoproto.stringer_all) = true;
|
||||||
|
option (gogoproto.goproto_getters_all) = true;
|
||||||
|
option (gogoproto.marshaler_all) = true;
|
||||||
|
option (gogoproto.sizer_all) = true;
|
||||||
|
option (gogoproto.unmarshaler_all) = true;
|
||||||
|
option (gogoproto.goproto_unrecognized_all) = false;
|
||||||
|
|
||||||
|
|
||||||
|
// PodResourcesLister is a service provided by the kubelet that provides information about the
|
||||||
|
// node resources consumed by pods and containers on the node
|
||||||
|
service PodResourcesLister {
|
||||||
|
rpc List(ListPodResourcesRequest) returns (ListPodResourcesResponse) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ListPodResourcesRequest is the request made to the PodResourcesLister service
|
||||||
|
message ListPodResourcesRequest {}
|
||||||
|
|
||||||
|
// ListPodResourcesResponse is the response returned by List function
|
||||||
|
message ListPodResourcesResponse {
|
||||||
|
repeated PodResources pod_resources = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PodResources contains information about the node resources assigned to a pod
|
||||||
|
message PodResources {
|
||||||
|
string name = 1;
|
||||||
|
string namespace = 2;
|
||||||
|
repeated ContainerResources containers = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContainerResources contains information about the resources assigned to a container
|
||||||
|
message ContainerResources {
|
||||||
|
string name = 1;
|
||||||
|
repeated ContainerDevices devices = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ContainerDevices contains information about the devices assigned to a container
|
||||||
|
message ContainerDevices {
|
||||||
|
string resource_name = 1;
|
||||||
|
repeated string device_ids = 2;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user