Skip to content

Commit fb533ab

Browse files
committed
Add GetServiceVersion for both client and exporter
1 parent 96cd113 commit fb533ab

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

proto/jumpstarter/client/v1/client.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ service ClientService {
5656
option (google.api.http) = {delete: "/v1/{name=namespaces/*/leases/*}"};
5757
option (google.api.method_signature) = "name";
5858
}
59+
60+
rpc GetServiceVersion(google.protobuf.Empty) returns (GetServiceVersionResponse) {
61+
option (google.api.http) = {get: "/v1/version"};
62+
option (google.api.method_signature) = "";
63+
}
5964
}
6065

6166
message Exporter {
@@ -168,3 +173,9 @@ message DeleteLeaseRequest {
168173
(google.api.resource_reference) = {type: "jumpstarter.dev/Lease"}
169174
];
170175
}
176+
177+
message GetServiceVersionResponse {
178+
string version = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
179+
string build_date = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
180+
string git_commit = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
181+
}

proto/jumpstarter/v1/common.proto

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ enum LogSource {
2525
LOG_SOURCE_BEFORE_LEASE_HOOK = 2; // beforeLease hook execution logs
2626
LOG_SOURCE_AFTER_LEASE_HOOK = 3; // afterLease hook execution logs
2727
LOG_SOURCE_SYSTEM = 4; // System/exporter logs
28-
}
28+
}
29+
30+
message GetServiceVersionResponse {
31+
string version = 1;
32+
string build_date = 2;
33+
string git_commit = 3;
34+
}

proto/jumpstarter/v1/jumpstarter.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import "jumpstarter/v1/common.proto";
1313

1414
// A service where a exporter can connect to make itself available
1515
service ControllerService {
16+
// Get service version1
17+
rpc GetServiceVersion(google.protobuf.Empty) returns (GetServiceVersionResponse);
18+
1619
// Exporter registration
1720
rpc Register(RegisterRequest) returns (RegisterResponse);
1821

@@ -227,4 +230,4 @@ message GetStatusRequest {}
227230
message GetStatusResponse {
228231
ExporterStatus status = 1;
229232
optional string message = 2;
230-
}
233+
}

proto/jumpstarter/v1/router.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ syntax = "proto3";
44

55
package jumpstarter.v1;
66

7+
import "google/protobuf/empty.proto";
8+
9+
import "jumpstarter/v1/common.proto";
10+
711
// StreamService
812
// Claims:
913
// iss: jumpstarter controller
1014
// aud: jumpstarter router
1115
// sub: jumpstarter client/exporter
1216
// stream: stream id
1317
service RouterService {
18+
// Get service version
19+
rpc GetServiceVersion(google.protobuf.Empty) returns (GetServiceVersionResponse);
1420
// Stream connects caller to another caller of the same stream
1521
rpc Stream(stream StreamRequest) returns (stream StreamResponse);
1622
}

0 commit comments

Comments
 (0)