mirror of
https://github.com/psviderski/uncloud.git
synced 2026-11-10 20:54:17 +00:00
feat(labels): support service and container labels, update labels and cpu/memory in-place
This commit is contained in:
@@ -32,6 +32,8 @@ service Docker {
|
||||
|
||||
rpc CreateServiceContainer(CreateServiceContainerRequest) returns (CreateContainerResponse);
|
||||
rpc InspectServiceContainer(InspectContainerRequest) returns (ServiceContainer);
|
||||
// UpdateServiceContainer updates the requested properties of a service container in place without recreating it.
|
||||
rpc UpdateServiceContainer(UpdateServiceContainerRequest) returns (google.protobuf.Empty);
|
||||
rpc ListServiceContainers(ListServiceContainersRequest) returns (ListServiceContainersResponse);
|
||||
rpc RemoveServiceContainer(RemoveContainerRequest) returns (google.protobuf.Empty);
|
||||
}
|
||||
@@ -281,6 +283,23 @@ message ServiceContainer {
|
||||
bytes service_spec = 2;
|
||||
}
|
||||
|
||||
message UpdateServiceContainerRequest {
|
||||
string id = 1;
|
||||
// Fields that are not set are left unchanged. CPU and memory limits can be changed but not removed.
|
||||
// CPU limit in nanocores.
|
||||
optional int64 cpu = 2;
|
||||
// Memory limit in bytes.
|
||||
optional int64 memory = 3;
|
||||
// Memory reservation in bytes.
|
||||
optional int64 memory_reservation = 4;
|
||||
// Service labels that replace all current service labels.
|
||||
Labels service_labels = 5;
|
||||
}
|
||||
|
||||
message Labels {
|
||||
map<string, string> labels = 1;
|
||||
}
|
||||
|
||||
message ListServiceContainersRequest {
|
||||
string service_id = 1;
|
||||
// JSON serialised container.ListOptions.
|
||||
|
||||
Reference in New Issue
Block a user