mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-20 06:01:13 +02:00
This enables the ability to specify additional <talos> endpoints to connect to to pull back data. Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
164 lines
3.4 KiB
Protocol Buffer
164 lines
3.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package proto;
|
|
|
|
option go_package = "osapi";
|
|
option java_multiple_files = true;
|
|
option java_outer_classname = "OsApi";
|
|
option java_package = "com.os.api";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
// The OS service definition.
|
|
//
|
|
// OS Service also implements all the API of Init Service
|
|
service OS {
|
|
rpc Containers(ContainersRequest) returns (ContainersReply);
|
|
rpc Dmesg(google.protobuf.Empty) returns (DataReply);
|
|
rpc Kubeconfig(google.protobuf.Empty) returns (DataReply);
|
|
rpc Logs(LogsRequest) returns (stream Data);
|
|
rpc Processes(google.protobuf.Empty) returns (ProcessesReply);
|
|
rpc Restart(RestartRequest) returns (RestartReply);
|
|
rpc Stats(StatsRequest) returns (StatsReply);
|
|
}
|
|
|
|
// Common metadata message nested in all reply message types
|
|
message NodeMetadata {
|
|
string hostname = 1;
|
|
}
|
|
|
|
// rpc Containers
|
|
|
|
// The request message containing the containerd namespace.
|
|
enum ContainerDriver {
|
|
CONTAINERD = 0;
|
|
CRI = 1;
|
|
}
|
|
|
|
message ContainersRequest {
|
|
string namespace = 1;
|
|
// driver might be default "containerd" or "cri"
|
|
ContainerDriver driver = 2;
|
|
}
|
|
|
|
// The response message containing the requested containers.
|
|
message Container {
|
|
string namespace = 1;
|
|
string id = 2;
|
|
string image = 3;
|
|
uint32 pid = 4;
|
|
string status = 5;
|
|
string pod_id = 6;
|
|
string name = 7;
|
|
}
|
|
|
|
// The response message containing the requested containers.
|
|
message ContainerResponse {
|
|
NodeMetadata metadata = 1;
|
|
repeated Container containers = 2;
|
|
}
|
|
|
|
message ContainersReply {
|
|
repeated ContainerResponse response = 1;
|
|
}
|
|
|
|
// rpc dmesg
|
|
// rpc kubeconfig
|
|
|
|
// The response message containing the requested logs.
|
|
message Data {
|
|
bytes bytes = 1;
|
|
}
|
|
|
|
message DataResponse {
|
|
NodeMetadata metadata = 1;
|
|
Data bytes = 2;
|
|
}
|
|
|
|
message DataReply {
|
|
repeated DataResponse response = 1;
|
|
}
|
|
|
|
// rpc logs
|
|
|
|
// The request message containing the process name.
|
|
message LogsRequest {
|
|
string namespace = 1;
|
|
string id = 2;
|
|
// driver might be default "containerd" or "cri"
|
|
ContainerDriver driver = 3;
|
|
}
|
|
|
|
// rpc processes
|
|
message ProcessesRequest {}
|
|
|
|
message ProcessesReply {
|
|
repeated ProcessResponse response = 1;
|
|
}
|
|
|
|
message ProcessResponse {
|
|
NodeMetadata metadata = 1;
|
|
repeated Process processes = 2;
|
|
}
|
|
|
|
message Process {
|
|
int32 pid = 1;
|
|
int32 ppid = 2;
|
|
string state = 3;
|
|
int32 threads = 4;
|
|
double cpu_time = 5;
|
|
uint64 virtual_memory = 6;
|
|
uint64 resident_memory = 7;
|
|
string command = 8;
|
|
string executable = 9;
|
|
string args = 10;
|
|
}
|
|
|
|
// rpc restart
|
|
// The request message containing the process to restart.
|
|
message RestartRequest {
|
|
string namespace = 1;
|
|
string id = 2;
|
|
// driver might be default "containerd" or "cri"
|
|
ContainerDriver driver = 3;
|
|
}
|
|
|
|
message RestartResponse {
|
|
NodeMetadata metadata = 1;
|
|
}
|
|
|
|
// The response message containing the restart status.
|
|
message RestartReply {
|
|
repeated RestartResponse response = 1;
|
|
}
|
|
|
|
// rpc stats
|
|
|
|
// The request message containing the containerd namespace.
|
|
message StatsRequest {
|
|
string namespace = 1;
|
|
// driver might be default "containerd" or "cri"
|
|
ContainerDriver driver = 2;
|
|
}
|
|
|
|
// The response message containing the requested stats.
|
|
message StatsResponse {
|
|
NodeMetadata metadata = 1;
|
|
repeated Stat stats = 2;
|
|
}
|
|
|
|
message StatsReply {
|
|
repeated StatsResponse response = 1;
|
|
}
|
|
|
|
// The response message containing the requested stat.
|
|
message Stat {
|
|
string namespace = 1;
|
|
string id = 2;
|
|
uint64 memory_usage = 4;
|
|
uint64 cpu_usage = 5;
|
|
string pod_id = 6;
|
|
string name = 7;
|
|
}
|
|
|