Skip to content

Commit

Permalink
chore: update proto for infastructure info (#2092)
Browse files Browse the repository at this point in the history
  • Loading branch information
duonganhthu43 authored Sep 27, 2023
1 parent 8296ead commit f782cfe
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dozer-types/protos/cloud.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ syntax = "proto3";
package dozer.cloud;
import "cloud_types.proto";
import "cloud_notification.proto";
import "cloud_infastructure.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";

service DozerCloud {

rpc validate_connection(ConnectionRequest)
Expand Down Expand Up @@ -54,6 +54,8 @@ service DozerCloud {
rpc mark_notifications_as_read(MarkNotificationsRequest) returns (MarkNotificationsResponse);

rpc get_endpoint_commands_samples(GetEndpointCommandsSamplesRequest) returns (GetEndpointCommandsSamplesResponse);

rpc get_infastructure_info(GetInfastructureRequest) returns (GetInfastructureResponse);
}

service DozerPublic {
Expand Down
62 changes: 62 additions & 0 deletions dozer-types/protos/cloud_infastructure.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
syntax = "proto3";
package dozer.cloud;

message GetInfastructureRequest {
string app_id = 1;
uint32 deployment = 2;
}

message GetInfastructureResponse {
repeated PodInfo pods = 1;
}
message PodInfo {
string name = 1;
string created_at = 3;
repeated string labels = 4;
repeated ContainerInfo containers = 5;
optional string phase = 6;
optional string reason = 7;
}
message ContainerInfo {
string name = 1;
repeated ResourceInfo resources = 2;
optional string image = 3;
repeated string command = 4;
ContainerStatus status = 5;
}
message ContainerStatus {
optional string container_id = 1;
bool ready = 2;
uint32 restart_count = 3;
optional bool started = 4;
// detail about current state
optional ContainerState state = 5;
// Details about the container's last termination condition.
optional ContainerState last_state = 6;
}

message ContainerState {
optional ContainerStateRunning running = 1;
optional ContainerStateWaiting waiting = 2;
optional ContainerStateTerminated terminated = 3;
}
message ContainerStateTerminated {
optional string reason = 1;
optional string message = 2;
optional string finished_at = 3;
optional uint32 signal = 4;
uint32 exit_code = 5;
}
message ContainerStateRunning {
optional string started_at = 1;
}
message ContainerStateWaiting {
optional string reason = 1;
optional string message = 2;
}
message ResourceInfo {
string name = 1;
string limit = 2;
string usage = 3;
string request = 4;
}

0 comments on commit f782cfe

Please sign in to comment.