mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-23 07:31:13 +02:00
This PR moves the reset API to the init API definition. It leverages the same code we use for upgrades. Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
170 lines
4.8 KiB
Protocol Buffer
170 lines
4.8 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
|
|
|
package proto;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
// The OSD service definition.
|
|
//
|
|
// OSD Service also implements all the API of Init Service
|
|
service OSD {
|
|
rpc DF(google.protobuf.Empty) returns (DFReply) {}
|
|
rpc Dmesg(google.protobuf.Empty) returns (Data) {}
|
|
rpc Kubeconfig(google.protobuf.Empty) returns (Data) {}
|
|
rpc Logs(LogsRequest) returns (stream Data) {}
|
|
rpc Processes(ProcessesRequest) returns (ProcessesReply) {}
|
|
rpc Restart(RestartRequest) returns (RestartReply) {}
|
|
rpc Routes(google.protobuf.Empty) returns (RoutesReply) {}
|
|
rpc Stats(StatsRequest) returns (StatsReply) {}
|
|
rpc Top(google.protobuf.Empty) returns (TopReply) {}
|
|
rpc Version(google.protobuf.Empty) returns (Data) {}
|
|
}
|
|
|
|
enum ContainerDriver {
|
|
CONTAINERD = 0;
|
|
CRI = 1;
|
|
}
|
|
|
|
// The request message containing the containerd namespace.
|
|
message ProcessesRequest {
|
|
string namespace = 1;
|
|
// driver might be default "containerd" or "cri"
|
|
ContainerDriver driver = 2;
|
|
}
|
|
|
|
// The response message containing the requested processes.
|
|
message ProcessesReply { repeated Process processes = 1; }
|
|
|
|
// The response message containing the requested processes.
|
|
message Process {
|
|
string namespace = 1;
|
|
string id = 2;
|
|
string image = 3;
|
|
uint32 pid = 4;
|
|
string status = 5;
|
|
string pod_id = 6;
|
|
string name = 7;
|
|
}
|
|
|
|
// 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 StatsReply { repeated Stat stats = 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;
|
|
}
|
|
|
|
// 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;
|
|
}
|
|
|
|
// The response message containing the restart status.
|
|
message RestartReply {}
|
|
|
|
// 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;
|
|
}
|
|
|
|
// The response message containing the requested logs.
|
|
message Data { bytes bytes = 1; }
|
|
|
|
// The response message containing the routes.
|
|
message RoutesReply { repeated Route routes = 1; }
|
|
|
|
// The response message containing a route.
|
|
message Route {
|
|
|
|
// Interface is the interface over which traffic to this destination should be sent
|
|
string interface = 1;
|
|
|
|
// Destination is the network prefix CIDR which this route provides
|
|
string destination = 2;
|
|
|
|
// Gateway is the gateway address to which traffic to this destination should be sent
|
|
string gateway = 3;
|
|
|
|
// Metric is the priority of the route, where lower metrics have higher priorities
|
|
uint32 metric = 4;
|
|
|
|
// Scope desribes the scope of this route
|
|
uint32 scope = 5;
|
|
|
|
// Source is the source prefix CIDR for the route, if one is defined
|
|
string source = 6;
|
|
|
|
// Family is the address family of the route. Currently, the only options are AF_INET (IPV4) and AF_INET6 (IPV6).
|
|
AddressFamily family = 7;
|
|
|
|
// Protocol is the protocol by which this route came to be in place
|
|
RouteProtocol protocol = 8;
|
|
|
|
// Flags indicate any special flags on the route
|
|
uint32 flags = 9;
|
|
}
|
|
|
|
enum AddressFamily {
|
|
option allow_alias = true;
|
|
AF_UNSPEC = 0x0;
|
|
AF_INET = 0x2;
|
|
IPV4 = 0x2;
|
|
AF_INET6 = 0xa;
|
|
IPV6 = 0xa;
|
|
}
|
|
|
|
enum RouteProtocol {
|
|
RTPROT_UNSPEC = 0;
|
|
RTPROT_REDIRECT = 1; // Route installed by ICMP redirects
|
|
RTPROT_KERNEL = 2; // Route installed by kernel
|
|
RTPROT_BOOT = 3; // Route installed during boot
|
|
RTPROT_STATIC = 4; // Route installed by administrator
|
|
RTPROT_GATED = 8; // Route installed by gated
|
|
RTPROT_RA = 9; // Route installed by router advertisement
|
|
RTPROT_MRT = 10; // Route installed by Merit MRT
|
|
RTPROT_ZEBRA = 11; // Route installed by Zebra/Quagga
|
|
RTPROT_BIRD = 12; // Route installed by Bird
|
|
RTPROT_DNROUTED = 13; // Route installed by DECnet routing daemon
|
|
RTPROT_XORP = 14; // Route installed by XORP
|
|
RTPROT_NTK = 15; // Route installed by Netsukuku
|
|
RTPROT_DHCP = 16; // Route installed by DHCP
|
|
RTPROT_MROUTED = 17; // Route installed by Multicast daemon
|
|
RTPROT_BABEL = 42; // Route installed by Babel daemon
|
|
}
|
|
|
|
message TopRequest {}
|
|
|
|
message TopReply { ProcessList process_list = 1; }
|
|
|
|
message ProcessList { bytes bytes = 1; }
|
|
|
|
// The response message containing the requested df stats.
|
|
message DFReply { repeated DFStat stats = 1; }
|
|
|
|
// The response message containing the requested processes.
|
|
message DFStat {
|
|
string filesystem = 1;
|
|
uint64 size = 2;
|
|
uint64 available = 3;
|
|
string mounted_on = 4;
|
|
}
|