mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-04 04:01:13 +02:00
Initial version which only allows setting CNI using preset, no custom CNI urls are supported at the moment. Still need to figure out what kind of UI can be used for that. Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
779 lines
19 KiB
Protocol Buffer
779 lines
19 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package machine;
|
|
|
|
option go_package = "github.com/talos-systems/talos/pkg/machinery/api/machine";
|
|
option java_multiple_files = true;
|
|
option java_outer_classname = "MachineApi";
|
|
option java_package = "com.machine.api";
|
|
|
|
import "google/protobuf/any.proto";
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "common/common.proto";
|
|
|
|
// The machine service definition.
|
|
service MachineService {
|
|
rpc ApplyConfiguration(ApplyConfigurationRequest)
|
|
returns (ApplyConfigurationResponse);
|
|
rpc Bootstrap(BootstrapRequest) returns (BootstrapResponse);
|
|
rpc Containers(ContainersRequest) returns (ContainersResponse);
|
|
rpc Copy(CopyRequest) returns (stream common.Data);
|
|
rpc CPUInfo(google.protobuf.Empty) returns (CPUInfoResponse);
|
|
rpc DiskStats(google.protobuf.Empty) returns (DiskStatsResponse);
|
|
rpc Dmesg(DmesgRequest) returns (stream common.Data);
|
|
rpc Events(EventsRequest) returns (stream Event);
|
|
rpc EtcdMemberList(EtcdMemberListRequest) returns (EtcdMemberListResponse);
|
|
rpc EtcdLeaveCluster(EtcdLeaveClusterRequest)
|
|
returns (EtcdLeaveClusterResponse);
|
|
rpc EtcdForfeitLeadership(EtcdForfeitLeadershipRequest)
|
|
returns (EtcdForfeitLeadershipResponse);
|
|
rpc GenerateConfiguration(GenerateConfigurationRequest)
|
|
returns (GenerateConfigurationResponse);
|
|
rpc Hostname(google.protobuf.Empty) returns (HostnameResponse);
|
|
rpc Kubeconfig(google.protobuf.Empty) returns (stream common.Data);
|
|
rpc List(ListRequest) returns (stream FileInfo);
|
|
rpc DiskUsage(DiskUsageRequest) returns (stream DiskUsageInfo);
|
|
rpc LoadAvg(google.protobuf.Empty) returns (LoadAvgResponse);
|
|
rpc Logs(LogsRequest) returns (stream common.Data);
|
|
rpc Memory(google.protobuf.Empty) returns (MemoryResponse);
|
|
rpc Mounts(google.protobuf.Empty) returns (MountsResponse);
|
|
rpc NetworkDeviceStats(google.protobuf.Empty)
|
|
returns (NetworkDeviceStatsResponse);
|
|
rpc Processes(google.protobuf.Empty) returns (ProcessesResponse);
|
|
rpc Read(ReadRequest) returns (stream common.Data);
|
|
rpc Reboot(google.protobuf.Empty) returns (RebootResponse);
|
|
rpc Restart(RestartRequest) returns (RestartResponse);
|
|
rpc Rollback(RollbackRequest) returns (RollbackResponse);
|
|
rpc Reset(ResetRequest) returns (ResetResponse);
|
|
rpc Recover(RecoverRequest) returns (RecoverResponse);
|
|
rpc ServiceList(google.protobuf.Empty) returns (ServiceListResponse);
|
|
rpc ServiceRestart(ServiceRestartRequest) returns (ServiceRestartResponse);
|
|
rpc ServiceStart(ServiceStartRequest) returns (ServiceStartResponse);
|
|
rpc ServiceStop(ServiceStopRequest) returns (ServiceStopResponse);
|
|
rpc Shutdown(google.protobuf.Empty) returns (ShutdownResponse);
|
|
rpc Stats(StatsRequest) returns (StatsResponse);
|
|
rpc SystemStat(google.protobuf.Empty) returns (SystemStatResponse);
|
|
rpc Upgrade(UpgradeRequest) returns (UpgradeResponse);
|
|
rpc Version(google.protobuf.Empty) returns (VersionResponse);
|
|
}
|
|
|
|
// rpc applyConfiguration
|
|
// ApplyConfiguration describes a request to assert a new configuration upon a
|
|
// node.
|
|
message ApplyConfigurationRequest {
|
|
bytes data = 1;
|
|
bool no_reboot = 2;
|
|
}
|
|
|
|
// ApplyConfigurationResponse describes the response to a configuration request.
|
|
message ApplyConfiguration { common.Metadata metadata = 1; }
|
|
message ApplyConfigurationResponse { repeated ApplyConfiguration messages = 1; }
|
|
|
|
// rpc reboot
|
|
// The reboot message containing the reboot status.
|
|
message Reboot { common.Metadata metadata = 1; }
|
|
message RebootResponse { repeated Reboot messages = 1; }
|
|
|
|
// rpc bootstrap
|
|
message BootstrapRequest {}
|
|
|
|
// The bootstrap message containing the bootstrap status.
|
|
message Bootstrap { common.Metadata metadata = 1; }
|
|
message BootstrapResponse { repeated Bootstrap messages = 1; }
|
|
|
|
// rpc events
|
|
message SequenceEvent {
|
|
string sequence = 1;
|
|
enum Action {
|
|
NOOP = 0;
|
|
START = 1;
|
|
STOP = 2;
|
|
}
|
|
Action action = 2;
|
|
common.Error error = 3;
|
|
}
|
|
|
|
message PhaseEvent {
|
|
string phase = 1;
|
|
enum Action {
|
|
START = 0;
|
|
STOP = 1;
|
|
}
|
|
Action action = 2;
|
|
}
|
|
|
|
message TaskEvent {
|
|
string task = 1;
|
|
enum Action {
|
|
START = 0;
|
|
STOP = 1;
|
|
}
|
|
Action action = 2;
|
|
}
|
|
|
|
message ServiceStateEvent {
|
|
string service = 1;
|
|
enum Action {
|
|
INITIALIZED = 0;
|
|
PREPARING = 1;
|
|
WAITING = 2;
|
|
RUNNING = 3;
|
|
STOPPING = 4;
|
|
FINISHED = 5;
|
|
FAILED = 6;
|
|
SKIPPED = 7;
|
|
};
|
|
Action action = 2;
|
|
string message = 3;
|
|
};
|
|
|
|
message EventsRequest {
|
|
int32 tail_events = 1;
|
|
string tail_id = 2;
|
|
int32 tail_seconds = 3;
|
|
}
|
|
|
|
message Event {
|
|
common.Metadata metadata = 1;
|
|
google.protobuf.Any data = 2;
|
|
string id = 3;
|
|
}
|
|
|
|
// rpc reset
|
|
message ResetRequest {
|
|
bool graceful = 1;
|
|
bool reboot = 2;
|
|
}
|
|
|
|
// The reset message containing the restart status.
|
|
message Reset { common.Metadata metadata = 1; }
|
|
message ResetResponse { repeated Reset messages = 1; }
|
|
|
|
// rpc recover
|
|
|
|
message RecoverRequest {
|
|
enum Source {
|
|
ETCD = 0;
|
|
APISERVER = 1;
|
|
}
|
|
|
|
Source source = 1;
|
|
}
|
|
|
|
// The recover message containing the recover status.
|
|
message Recover { common.Metadata metadata = 1; }
|
|
message RecoverResponse { repeated Recover messages = 1; }
|
|
|
|
// rpc shutdown
|
|
// The messages message containing the shutdown status.
|
|
message Shutdown { common.Metadata metadata = 1; }
|
|
message ShutdownResponse { repeated Shutdown messages = 1; }
|
|
|
|
// rpc upgrade
|
|
message UpgradeRequest {
|
|
string image = 1;
|
|
bool preserve = 2;
|
|
}
|
|
|
|
message Upgrade {
|
|
common.Metadata metadata = 1;
|
|
string ack = 2;
|
|
}
|
|
message UpgradeResponse { repeated Upgrade messages = 1; }
|
|
|
|
// rpc servicelist
|
|
message ServiceList {
|
|
common.Metadata metadata = 1;
|
|
repeated ServiceInfo services = 2;
|
|
}
|
|
message ServiceListResponse { repeated ServiceList messages = 1; }
|
|
|
|
message ServiceInfo {
|
|
string id = 1;
|
|
string state = 2;
|
|
ServiceEvents events = 3;
|
|
ServiceHealth health = 4;
|
|
}
|
|
|
|
message ServiceEvents { repeated ServiceEvent events = 1; }
|
|
|
|
message ServiceEvent {
|
|
string msg = 1;
|
|
string state = 2;
|
|
google.protobuf.Timestamp ts = 3;
|
|
}
|
|
|
|
message ServiceHealth {
|
|
bool unknown = 1;
|
|
bool healthy = 2;
|
|
string last_message = 3;
|
|
google.protobuf.Timestamp last_change = 4;
|
|
}
|
|
|
|
// rpc servicestart
|
|
message ServiceStartRequest { string id = 1; }
|
|
|
|
message ServiceStart {
|
|
common.Metadata metadata = 1;
|
|
string resp = 2;
|
|
}
|
|
message ServiceStartResponse { repeated ServiceStart messages = 1; }
|
|
|
|
message ServiceStopRequest { string id = 1; }
|
|
|
|
message ServiceStop {
|
|
common.Metadata metadata = 1;
|
|
string resp = 2;
|
|
}
|
|
message ServiceStopResponse { repeated ServiceStop messages = 1; }
|
|
|
|
message ServiceRestartRequest { string id = 1; }
|
|
|
|
message ServiceRestart {
|
|
common.Metadata metadata = 1;
|
|
string resp = 2;
|
|
}
|
|
message ServiceRestartResponse { repeated ServiceRestart messages = 1; }
|
|
|
|
message StartRequest {
|
|
option deprecated = true;
|
|
string id = 1;
|
|
}
|
|
|
|
message StartResponse {
|
|
option deprecated = true;
|
|
string resp = 1;
|
|
}
|
|
|
|
message StopRequest {
|
|
option deprecated = true;
|
|
string id = 1;
|
|
}
|
|
|
|
message StopResponse {
|
|
option deprecated = true;
|
|
string resp = 1;
|
|
}
|
|
|
|
// CopyRequest describes a request to copy data out of Talos node
|
|
//
|
|
// Copy produces .tar.gz archive which is streamed back to the caller
|
|
message CopyRequest {
|
|
// Root path to start copying data out, it might be either a file or directory
|
|
string root_path = 1;
|
|
}
|
|
|
|
// ListRequest describes a request to list the contents of a directory
|
|
message ListRequest {
|
|
// Root indicates the root directory for the list. If not indicated, '/' is
|
|
// presumed.
|
|
string root = 1;
|
|
// Recurse indicates that subdirectories should be recursed.
|
|
bool recurse = 2;
|
|
// RecursionDepth indicates how many levels of subdirectories should be
|
|
// recursed. The default (0) indicates that no limit should be enforced.
|
|
int32 recursion_depth = 3;
|
|
}
|
|
|
|
// DiskUsageRequest describes a request to list disk usage of directories and regular files
|
|
message DiskUsageRequest {
|
|
// RecursionDepth indicates how many levels of subdirectories should be
|
|
// recursed. The default (0) indicates that no limit should be enforced.
|
|
int32 recursion_depth = 1;
|
|
// All write sizes for all files, not just directories.
|
|
bool all = 2;
|
|
// Threshold exclude entries smaller than SIZE if positive,
|
|
// or entries greater than SIZE if negative.
|
|
int64 threshold = 3;
|
|
// DiskUsagePaths is the list of directories to calculate disk usage for.
|
|
repeated string paths = 4;
|
|
}
|
|
|
|
// FileInfo describes a file or directory's information
|
|
message FileInfo {
|
|
common.Metadata metadata = 1;
|
|
// Name is the name (including prefixed path) of the file or directory
|
|
string name = 2;
|
|
// Size indicates the number of bytes contained within the file
|
|
int64 size = 3;
|
|
// Mode is the bitmap of UNIX mode/permission flags of the file
|
|
uint32 mode = 4;
|
|
// Modified indicates the UNIX timestamp at which the file was last modified
|
|
int64 modified = 5; // TODO: unix timestamp or include proto's Date type
|
|
// IsDir indicates that the file is a directory
|
|
bool is_dir = 6;
|
|
// Error describes any error encountered while trying to read the file
|
|
// information.
|
|
string error = 7;
|
|
// Link is filled with symlink target
|
|
string link = 8;
|
|
// RelativeName is the name of the file or directory relative to the RootPath
|
|
string relative_name = 9;
|
|
}
|
|
|
|
// DiskUsageInfo describes a file or directory's information for du command
|
|
message DiskUsageInfo {
|
|
common.Metadata metadata = 1;
|
|
// Name is the name (including prefixed path) of the file or directory
|
|
string name = 2;
|
|
// Size indicates the number of bytes contained within the file
|
|
int64 size = 3;
|
|
// Error describes any error encountered while trying to read the file
|
|
// information.
|
|
string error = 4;
|
|
// RelativeName is the name of the file or directory relative to the RootPath
|
|
string relative_name = 5;
|
|
}
|
|
|
|
// The messages message containing the requested df stats.
|
|
message Mounts {
|
|
common.Metadata metadata = 1;
|
|
repeated MountStat stats = 2;
|
|
}
|
|
message MountsResponse { repeated Mounts messages = 1; }
|
|
|
|
// The messages message containing the requested processes.
|
|
message MountStat {
|
|
string filesystem = 1;
|
|
uint64 size = 2;
|
|
uint64 available = 3;
|
|
string mounted_on = 4;
|
|
}
|
|
|
|
message Version {
|
|
common.Metadata metadata = 1;
|
|
VersionInfo version = 2;
|
|
PlatformInfo platform = 3;
|
|
}
|
|
|
|
message VersionResponse { repeated Version messages = 1; }
|
|
|
|
message VersionInfo {
|
|
string tag = 1;
|
|
string sha = 2;
|
|
string built = 3;
|
|
string go_version = 4;
|
|
string os = 5;
|
|
string arch = 6;
|
|
}
|
|
|
|
message PlatformInfo {
|
|
string name = 1;
|
|
string mode = 2;
|
|
}
|
|
|
|
// rpc logs
|
|
// The request message containing the process name.
|
|
message LogsRequest {
|
|
string namespace = 1;
|
|
string id = 2;
|
|
// driver might be default "containerd" or "cri"
|
|
common.ContainerDriver driver = 3;
|
|
bool follow = 4;
|
|
int32 tail_lines = 5;
|
|
}
|
|
|
|
message ReadRequest { string path = 1; }
|
|
|
|
// rpc rollback
|
|
message RollbackRequest {}
|
|
|
|
message Rollback { common.Metadata metadata = 1; }
|
|
message RollbackResponse { repeated Rollback messages = 1; }
|
|
|
|
// rpc Containers
|
|
|
|
message ContainersRequest {
|
|
string namespace = 1;
|
|
// driver might be default "containerd" or "cri"
|
|
common.ContainerDriver driver = 2;
|
|
}
|
|
|
|
// The messages message containing the requested containers.
|
|
message ContainerInfo {
|
|
string namespace = 1;
|
|
string id = 2;
|
|
string image = 3;
|
|
uint32 pid = 4;
|
|
string status = 5;
|
|
string pod_id = 6;
|
|
string name = 7;
|
|
}
|
|
|
|
// The messages message containing the requested containers.
|
|
message Container {
|
|
common.Metadata metadata = 1;
|
|
repeated ContainerInfo containers = 2;
|
|
}
|
|
|
|
message ContainersResponse { repeated Container messages = 1; }
|
|
|
|
// dmesg
|
|
message DmesgRequest {
|
|
bool follow = 1;
|
|
bool tail = 2;
|
|
}
|
|
|
|
// rpc processes
|
|
message ProcessesRequest {}
|
|
|
|
message ProcessesResponse { repeated Process messages = 1; }
|
|
|
|
message Process {
|
|
common.Metadata metadata = 1;
|
|
repeated ProcessInfo processes = 2;
|
|
}
|
|
|
|
message ProcessInfo {
|
|
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"
|
|
common.ContainerDriver driver = 3;
|
|
}
|
|
|
|
message Restart { common.Metadata metadata = 1; }
|
|
|
|
// The messages message containing the restart status.
|
|
message RestartResponse { repeated Restart messages = 1; }
|
|
|
|
// rpc stats
|
|
|
|
// The request message containing the containerd namespace.
|
|
message StatsRequest {
|
|
string namespace = 1;
|
|
// driver might be default "containerd" or "cri"
|
|
common.ContainerDriver driver = 2;
|
|
}
|
|
|
|
// The messages message containing the requested stats.
|
|
message Stats {
|
|
common.Metadata metadata = 1;
|
|
repeated Stat stats = 2;
|
|
}
|
|
|
|
message StatsResponse { repeated Stats messages = 1; }
|
|
|
|
// The messages 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;
|
|
}
|
|
|
|
message Memory {
|
|
common.Metadata metadata = 1;
|
|
MemInfo meminfo = 2;
|
|
}
|
|
|
|
message MemoryResponse { repeated Memory messages = 1; }
|
|
|
|
message MemInfo {
|
|
uint64 memtotal = 1;
|
|
uint64 memfree = 2;
|
|
uint64 memavailable = 3;
|
|
uint64 buffers = 4;
|
|
uint64 cached = 5;
|
|
uint64 swapcached = 6;
|
|
uint64 active = 7;
|
|
uint64 inactive = 8;
|
|
uint64 activeanon = 9;
|
|
uint64 inactiveanon = 10;
|
|
uint64 activefile = 11;
|
|
uint64 inactivefile = 12;
|
|
uint64 unevictable = 13;
|
|
uint64 mlocked = 14;
|
|
uint64 swaptotal = 15;
|
|
uint64 swapfree = 16;
|
|
uint64 dirty = 17;
|
|
uint64 writeback = 18;
|
|
uint64 anonpages = 19;
|
|
uint64 mapped = 20;
|
|
uint64 shmem = 21;
|
|
uint64 slab = 22;
|
|
uint64 sreclaimable = 23;
|
|
uint64 sunreclaim = 24;
|
|
uint64 kernelstack = 25;
|
|
uint64 pagetables = 26;
|
|
uint64 nfsunstable = 27;
|
|
uint64 bounce = 28;
|
|
uint64 writebacktmp = 29;
|
|
uint64 commitlimit = 30;
|
|
uint64 committedas = 31;
|
|
uint64 vmalloctotal = 32;
|
|
uint64 vmallocused = 33;
|
|
uint64 vmallocchunk = 34;
|
|
uint64 hardwarecorrupted = 35;
|
|
uint64 anonhugepages = 36;
|
|
uint64 shmemhugepages = 37;
|
|
uint64 shmempmdmapped = 38;
|
|
uint64 cmatotal = 39;
|
|
uint64 cmafree = 40;
|
|
uint64 hugepagestotal = 41;
|
|
uint64 hugepagesfree = 42;
|
|
uint64 hugepagesrsvd = 43;
|
|
uint64 hugepagessurp = 44;
|
|
uint64 hugepagesize = 45;
|
|
uint64 directmap4k = 46;
|
|
uint64 directmap2m = 47;
|
|
uint64 directmap1g = 48;
|
|
}
|
|
|
|
// rpc Hostname
|
|
|
|
message HostnameResponse { repeated Hostname messages = 1; }
|
|
|
|
message Hostname {
|
|
common.Metadata metadata = 1;
|
|
string hostname = 2;
|
|
}
|
|
|
|
// rpc LoadAvg
|
|
|
|
message LoadAvgResponse { repeated LoadAvg messages = 1; }
|
|
|
|
message LoadAvg {
|
|
common.Metadata metadata = 1;
|
|
double load1 = 2;
|
|
double load5 = 3;
|
|
double load15 = 4;
|
|
}
|
|
|
|
// rpc SystemStat
|
|
|
|
message SystemStatResponse { repeated SystemStat messages = 1; }
|
|
|
|
message SystemStat {
|
|
common.Metadata metadata = 1;
|
|
uint64 boot_time = 2;
|
|
CPUStat cpu_total = 3;
|
|
repeated CPUStat cpu = 4;
|
|
uint64 irq_total = 5;
|
|
repeated uint64 irq = 6;
|
|
uint64 context_switches = 7;
|
|
uint64 process_created = 8;
|
|
uint64 process_running = 9;
|
|
uint64 process_blocked = 10;
|
|
uint64 soft_irq_total = 11;
|
|
SoftIRQStat soft_irq = 12;
|
|
}
|
|
|
|
message CPUStat {
|
|
double user = 1;
|
|
double nice = 2;
|
|
double system = 3;
|
|
double idle = 4;
|
|
double iowait = 5;
|
|
double irq = 6;
|
|
double soft_irq = 7;
|
|
double steal = 8;
|
|
double guest = 9;
|
|
double guest_nice = 10;
|
|
}
|
|
|
|
message SoftIRQStat {
|
|
uint64 hi = 1;
|
|
uint64 timer = 2;
|
|
uint64 net_tx = 3;
|
|
uint64 net_rx = 4;
|
|
uint64 block = 5;
|
|
uint64 block_io_poll = 6;
|
|
uint64 tasklet = 7;
|
|
uint64 sched = 8;
|
|
uint64 hrtimer = 9;
|
|
uint64 rcu = 10;
|
|
}
|
|
|
|
// rpc CPUInfo
|
|
|
|
message CPUInfoResponse { repeated CPUsInfo messages = 1; }
|
|
|
|
message CPUsInfo {
|
|
common.Metadata metadata = 1;
|
|
repeated CPUInfo cpu_info = 2;
|
|
}
|
|
|
|
message CPUInfo {
|
|
uint32 processor = 1;
|
|
string vendor_id = 2;
|
|
string cpu_family = 3;
|
|
string model = 4;
|
|
string model_name = 5;
|
|
string stepping = 6;
|
|
string microcode = 7;
|
|
double cpu_mhz = 8;
|
|
string cache_size = 9;
|
|
string physical_id = 10;
|
|
uint32 siblings = 11;
|
|
string core_id = 12;
|
|
uint32 cpu_cores = 13;
|
|
string apic_id = 14;
|
|
string initial_apic_id = 15;
|
|
string fpu = 16;
|
|
string fpu_exception = 17;
|
|
uint32 cpu_id_level = 18;
|
|
string wp = 19;
|
|
repeated string flags = 20;
|
|
repeated string bugs = 21;
|
|
double bogo_mips = 22;
|
|
uint32 cl_flush_size = 23;
|
|
uint32 cache_alignment = 24;
|
|
string address_sizes = 25;
|
|
string power_management = 26;
|
|
}
|
|
|
|
// rpc NetworkDeviceStats
|
|
|
|
message NetworkDeviceStatsResponse { repeated NetworkDeviceStats messages = 1; }
|
|
|
|
message NetworkDeviceStats {
|
|
common.Metadata metadata = 1;
|
|
NetDev total = 2;
|
|
repeated NetDev devices = 3;
|
|
}
|
|
|
|
message NetDev {
|
|
string name = 1;
|
|
uint64 rx_bytes = 2;
|
|
uint64 rx_packets = 3;
|
|
uint64 rx_errors = 4;
|
|
uint64 rx_dropped = 5;
|
|
uint64 rx_fifo = 6;
|
|
uint64 rx_frame = 7;
|
|
uint64 rx_compressed = 8;
|
|
uint64 rx_multicast = 9;
|
|
uint64 tx_bytes = 10;
|
|
uint64 tx_packets = 11;
|
|
uint64 tx_errors = 12;
|
|
uint64 tx_dropped = 13;
|
|
uint64 tx_fifo = 14;
|
|
uint64 tx_collisions = 15;
|
|
uint64 tx_carrier = 16;
|
|
uint64 tx_compressed = 17;
|
|
}
|
|
|
|
// rpc DiskStats
|
|
|
|
message DiskStatsResponse { repeated DiskStats messages = 1; }
|
|
|
|
message DiskStats {
|
|
common.Metadata metadata = 1;
|
|
DiskStat total = 2;
|
|
repeated DiskStat devices = 3;
|
|
}
|
|
|
|
message DiskStat {
|
|
string name = 1;
|
|
uint64 read_completed = 2;
|
|
uint64 read_merged = 3;
|
|
uint64 read_sectors = 4;
|
|
uint64 read_time_ms = 5;
|
|
uint64 write_completed = 6;
|
|
uint64 write_merged = 7;
|
|
uint64 write_sectors = 8;
|
|
uint64 write_time_ms = 9;
|
|
uint64 io_in_progress = 10;
|
|
uint64 io_time_ms = 11;
|
|
uint64 io_time_weighted_ms = 12;
|
|
uint64 discard_completed = 13;
|
|
uint64 discard_merged = 14;
|
|
uint64 discard_sectors = 15;
|
|
uint64 discard_time_ms = 16;
|
|
}
|
|
|
|
message EtcdLeaveClusterRequest {}
|
|
message EtcdLeaveCluster { common.Metadata metadata = 1; }
|
|
message EtcdLeaveClusterResponse { repeated EtcdLeaveCluster messages = 1; }
|
|
|
|
message EtcdForfeitLeadershipRequest {}
|
|
message EtcdForfeitLeadership {
|
|
common.Metadata metadata = 1;
|
|
string member = 2;
|
|
}
|
|
message EtcdForfeitLeadershipResponse {
|
|
repeated EtcdForfeitLeadership messages = 1;
|
|
}
|
|
|
|
message EtcdMemberListRequest {}
|
|
message EtcdMemberList {
|
|
common.Metadata metadata = 1;
|
|
repeated string members = 2;
|
|
}
|
|
message EtcdMemberListResponse { repeated EtcdMemberList messages = 1; }
|
|
|
|
// rpc generateConfiguration
|
|
|
|
message NetworkConfig {
|
|
string hostname = 1;
|
|
}
|
|
|
|
message InstallConfig {
|
|
string install_disk = 1;
|
|
string install_image = 2;
|
|
}
|
|
|
|
message MachineConfig {
|
|
enum MachineType {
|
|
TYPE_UNKNOWN = 0;
|
|
TYPE_INIT = 1;
|
|
TYPE_CONTROL_PLANE = 2;
|
|
TYPE_JOIN = 3;
|
|
};
|
|
MachineType type = 1;
|
|
InstallConfig install_config = 2;
|
|
NetworkConfig network_config = 3;
|
|
string kubernetes_version = 4;
|
|
}
|
|
|
|
message ControlPlaneConfig {
|
|
string endpoint = 1;
|
|
}
|
|
|
|
message CNIConfig {
|
|
string name = 1;
|
|
repeated string urls = 2;
|
|
}
|
|
|
|
message ClusterNetworkConfig {
|
|
string dns_domain = 1;
|
|
CNIConfig cni_config = 2;
|
|
}
|
|
|
|
message ClusterConfig {
|
|
string name = 1;
|
|
ControlPlaneConfig control_plane = 2;
|
|
ClusterNetworkConfig cluster_network = 3;
|
|
}
|
|
|
|
// GenerateConfigurationRequest describes a request to generate a new configuration
|
|
// on a node.
|
|
message GenerateConfigurationRequest {
|
|
string config_version = 1;
|
|
ClusterConfig cluster_config = 2;
|
|
MachineConfig machine_config = 3;
|
|
}
|
|
// GenerateConfiguration describes the response to a generate configuration request.
|
|
message GenerateConfigurationResponse {
|
|
common.Metadata metadata = 1;
|
|
repeated bytes data = 2;
|
|
bytes talosconfig = 3;
|
|
}
|