Skip to content

Commit 4f31ce7

Browse files
committed
Add proto for zone services and spire
1 parent 1100b9a commit 4f31ce7

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

protect/control/v1/common.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ message ZoneNetworkNeighborEntry {
224224
uint32 kind = 6;
225225
}
226226

227+
message ZoneServiceConfig {
228+
string zone_id = 1;
229+
string service = 2;
230+
}
231+
227232
message ZoneNetworkConfig {
228233
repeated ZoneNetworkInterfaceConfig interfaces = 1;
229234
repeated ZoneNetworkRoute routes = 2;
@@ -300,6 +305,11 @@ message NetworkReservation {
300305
string gateway_mac = 7;
301306
}
302307

308+
message ServiceEntry {
309+
string zone_id = 1;
310+
string service_name = 2;
311+
}
312+
303313
message WorkloadSpec {
304314
string name = 1;
305315
string zone_id = 2;

protect/control/v1/control.proto

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@ service ControlService {
2727
rpc ResolveZoneIds(ResolveZoneIdsRequest) returns (ResolveZoneIdsReply);
2828
rpc GetZone(GetZoneRequest) returns (GetZoneReply);
2929
rpc ListZones(ListZonesRequest) returns (stream ListZonesReply);
30+
rpc DiscoverServices(DiscoverServicesRequest) returns (stream DiscoverServicesReply);
31+
rpc GetSpireBundle(SpireBundleRequest) returns (SpireBundleReply);
3032

3133
rpc UpdateZoneResources(UpdateZoneResourcesRequest) returns (UpdateZoneResourcesReply);
3234
rpc ConfigureZoneNetwork(ConfigureZoneNetworkRequest) returns (ConfigureZoneNetworkReply);
3335

36+
rpc AdvertiseZoneService(AdvertiseZoneServiceRequest) returns (AdvertiseZoneServiceReply);
37+
rpc UnadvertiseZoneService(UnadvertiseZoneServiceRequest) returns (UnadvertiseZoneServiceReply);
38+
3439
rpc AttachZoneConsole(stream ZoneConsoleRequest) returns (stream ZoneConsoleReply);
3540
rpc ExecuteZoneCommand(stream ExecuteZoneCommandRequest) returns (stream ExecuteZoneCommandReply);
3641
rpc ReadZoneMetrics(ReadZoneMetricsRequest) returns (ReadZoneMetricsReply);
@@ -336,6 +341,18 @@ message ZoneKernelEventParam {
336341
string param_type_pretty = 5;
337342
}
338343

344+
message DiscoverServicesRequest {}
345+
346+
message DiscoverServicesReply {
347+
repeated protect.common.v1.ServiceEntry service_entry = 1;
348+
}
349+
350+
message SpireBundleRequest {}
351+
352+
message SpireBundleReply {
353+
string bundle = 1;
354+
}
355+
339356
message ExecuteZoneCommandRequest {
340357
oneof request {
341358
ExecuteZoneCommandStart start = 1;
@@ -403,6 +420,8 @@ message WatchEventsReply {
403420
oneof event {
404421
ZoneChangedEvent zone_changed = 1;
405422
WorkloadChangedEvent workload_changed = 2;
423+
AdvertiseServiceEvent advertise_service = 3;
424+
UnadvertiseServiceEvent unadvertise_service = 4;
406425
}
407426
}
408427

@@ -414,6 +433,14 @@ message WorkloadChangedEvent {
414433
Workload workload = 1;
415434
}
416435

436+
message AdvertiseServiceEvent {
437+
protect.common.v1.ServiceEntry service_entry = 1;
438+
}
439+
440+
message UnadvertiseServiceEvent {
441+
string uuid = 1;
442+
}
443+
417444
message ReadZoneMetricsRequest {
418445
string zone_id = 1;
419446
}
@@ -602,6 +629,20 @@ message ConfigureZoneNetworkRequest {
602629

603630
message ConfigureZoneNetworkReply {}
604631

632+
633+
message AdvertiseZoneServiceRequest {
634+
string uuid = 1;
635+
protect.common.v1.ZoneServiceConfig config = 2;
636+
}
637+
638+
message AdvertiseZoneServiceReply {}
639+
640+
message UnadvertiseZoneServiceRequest {
641+
protect.common.v1.ZoneServiceConfig config = 2;
642+
}
643+
644+
message UnadvertiseZoneServiceReply {}
645+
605646
message DialNetworkSocketRequest {
606647
oneof request {
607648
DialNetworkSocketStart start = 1;

0 commit comments

Comments
 (0)