diff --git a/proto/jumpstarter/client/v1/client.proto b/proto/jumpstarter/client/v1/client.proto index 1684d8e..31acccd 100644 --- a/proto/jumpstarter/client/v1/client.proto +++ b/proto/jumpstarter/client/v1/client.proto @@ -56,6 +56,11 @@ service ClientService { option (google.api.http) = {delete: "/v1/{name=namespaces/*/leases/*}"}; option (google.api.method_signature) = "name"; } + + rpc GetServiceVersion(google.protobuf.Empty) returns (GetServiceVersionResponse) { + option (google.api.http) = {get: "/v1/version"}; + option (google.api.method_signature) = ""; + } } message Exporter { @@ -168,3 +173,9 @@ message DeleteLeaseRequest { (google.api.resource_reference) = {type: "jumpstarter.dev/Lease"} ]; } + +message GetServiceVersionResponse { + string version = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + string build_date = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + string git_commit = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto/jumpstarter/v1/common.proto b/proto/jumpstarter/v1/common.proto index 8748522..bfa505b 100644 --- a/proto/jumpstarter/v1/common.proto +++ b/proto/jumpstarter/v1/common.proto @@ -25,4 +25,10 @@ enum LogSource { LOG_SOURCE_BEFORE_LEASE_HOOK = 2; // beforeLease hook execution logs LOG_SOURCE_AFTER_LEASE_HOOK = 3; // afterLease hook execution logs LOG_SOURCE_SYSTEM = 4; // System/exporter logs -} \ No newline at end of file +} + +message GetServiceVersionResponse { + string version = 1; + string build_date = 2; + string git_commit = 3; +} diff --git a/proto/jumpstarter/v1/jumpstarter.proto b/proto/jumpstarter/v1/jumpstarter.proto index d72369d..c08b0d9 100644 --- a/proto/jumpstarter/v1/jumpstarter.proto +++ b/proto/jumpstarter/v1/jumpstarter.proto @@ -13,6 +13,9 @@ import "jumpstarter/v1/common.proto"; // A service where a exporter can connect to make itself available service ControllerService { + // Get service version1 + rpc GetServiceVersion(google.protobuf.Empty) returns (GetServiceVersionResponse); + // Exporter registration rpc Register(RegisterRequest) returns (RegisterResponse); @@ -61,6 +64,7 @@ message RegisterRequest { // jumpstarter.dev/hostname= // jumpstarter.dev/name= repeated DriverInstanceReport reports = 2; + string version = 3; } message DriverInstanceReport { @@ -69,6 +73,8 @@ message DriverInstanceReport { map labels = 3; optional string description = 4; // optional custom driver description for CLI map methods_description = 5; // method name -> help text for CLI + string version = 6; // driver software version + string minimum_cli_version = 7; // the oldest compatible software version for the client side } message RegisterResponse { @@ -143,6 +149,7 @@ message GetReportResponse { // jumpstarter.dev/name= repeated DriverInstanceReport reports = 3; repeated Endpoint alternative_endpoints = 4; + string version = 5; // exporter software version } message Endpoint { diff --git a/proto/jumpstarter/v1/router.proto b/proto/jumpstarter/v1/router.proto index 98458ae..cca02e8 100644 --- a/proto/jumpstarter/v1/router.proto +++ b/proto/jumpstarter/v1/router.proto @@ -4,6 +4,10 @@ syntax = "proto3"; package jumpstarter.v1; +import "google/protobuf/empty.proto"; + +import "jumpstarter/v1/common.proto"; + // StreamService // Claims: // iss: jumpstarter controller @@ -11,6 +15,8 @@ package jumpstarter.v1; // sub: jumpstarter client/exporter // stream: stream id service RouterService { + // Get service version + rpc GetServiceVersion(google.protobuf.Empty) returns (GetServiceVersionResponse); // Stream connects caller to another caller of the same stream rpc Stream(stream StreamRequest) returns (stream StreamResponse); }