From 8dd776815f4310f0300032691c4b56c4cd61deec Mon Sep 17 00:00:00 2001 From: mnm678 Date: Wed, 31 Dec 2025 19:25:50 +0000 Subject: [PATCH 1/3] Add proto for zone services --- protect/control/v1/common.proto | 9 +++++++++ protect/control/v1/control.proto | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index 7d5db29..4ce6a07 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -224,6 +224,10 @@ message ZoneNetworkNeighborEntry { uint32 kind = 6; } +message ZoneServiceConfig { + string service = 1; +} + message ZoneNetworkConfig { repeated ZoneNetworkInterfaceConfig interfaces = 1; repeated ZoneNetworkRoute routes = 2; @@ -300,6 +304,11 @@ message NetworkReservation { string gateway_mac = 7; } +message ServiceEntry { + string uuid = 1; + string service_name = 2; +} + message WorkloadSpec { string name = 1; string zone_id = 2; diff --git a/protect/control/v1/control.proto b/protect/control/v1/control.proto index ce92150..1642696 100644 --- a/protect/control/v1/control.proto +++ b/protect/control/v1/control.proto @@ -27,10 +27,14 @@ service ControlService { rpc ResolveZoneIds(ResolveZoneIdsRequest) returns (ResolveZoneIdsReply); rpc GetZone(GetZoneRequest) returns (GetZoneReply); rpc ListZones(ListZonesRequest) returns (stream ListZonesReply); + rpc DiscoverServices(DiscoverServicesRequest) returns (stream DiscoverServicesReply); rpc UpdateZoneResources(UpdateZoneResourcesRequest) returns (UpdateZoneResourcesReply); rpc ConfigureZoneNetwork(ConfigureZoneNetworkRequest) returns (ConfigureZoneNetworkReply); + rpc AdvertiseZoneService(AdvertiseZoneServiceRequest) returns (AdvertiseZoneServiceReply); + rpc UnadvertiseZoneService(UnadvertiseZoneServiceRequest) returns (UnadvertiseZoneServiceReply); + rpc AttachZoneConsole(stream ZoneConsoleRequest) returns (stream ZoneConsoleReply); rpc ExecuteZoneCommand(stream ExecuteZoneCommandRequest) returns (stream ExecuteZoneCommandReply); rpc ReadZoneMetrics(ReadZoneMetricsRequest) returns (ReadZoneMetricsReply); @@ -327,6 +331,12 @@ message ZoneKernelEventParam { string param_type_pretty = 5; } +message DiscoverServicesRequest {} + +message DiscoverServicesReply { + repeated ServiceEntry service_entry = 1; +} + message ExecuteZoneCommandRequest { oneof request { ExecuteZoneCommandStart start = 1; @@ -593,6 +603,20 @@ message ConfigureZoneNetworkRequest { message ConfigureZoneNetworkReply {} +message AdvertiseZoneServiceRequest { + string zone_id = 1; + ZoneServiceConfig config = 2; +} + +message AdvertiseZoneServiceReply {} + +message UnadvertiseZoneServiceRequest { + string zone_id = 1; + ZoneServiceConfig config = 2; +} + +message UnadvertiseZoneServiceReply {} + message DialNetworkSocketRequest { oneof request { DialNetworkSocketStart start = 1; From 3202cfabf606e1c5300cfcac3d7260c8650ba8d0 Mon Sep 17 00:00:00 2001 From: mnm678 Date: Wed, 31 Dec 2025 19:27:15 +0000 Subject: [PATCH 2/3] Add advertise and unadvertise service events --- protect/control/v1/control.proto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/protect/control/v1/control.proto b/protect/control/v1/control.proto index 1642696..ce1b2a1 100644 --- a/protect/control/v1/control.proto +++ b/protect/control/v1/control.proto @@ -404,6 +404,8 @@ message WatchEventsReply { oneof event { ZoneChangedEvent zone_changed = 1; WorkloadChangedEvent workload_changed = 2; + AdvertiseServiceEvent advertise_service = 3; + UnadvertiseServiceEvent unadvertise_service = 4; } } @@ -415,6 +417,14 @@ message WorkloadChangedEvent { Workload workload = 1; } +message AdvertiseServiceEvent { + ServiceEntry service_entry = 1; +} + +message UnadvertiseServiceEvent { + string uuid = 1; +} + message ReadZoneMetricsRequest { string zone_id = 1; } From eb38a2eba70637fe88aa027c0554e56dac466b7f Mon Sep 17 00:00:00 2001 From: mnm678 Date: Wed, 31 Dec 2025 20:24:18 +0000 Subject: [PATCH 3/3] enable multiple services per zone --- protect/control/v1/common.proto | 5 +++-- protect/control/v1/control.proto | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index 4ce6a07..6543c63 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -225,7 +225,8 @@ message ZoneNetworkNeighborEntry { } message ZoneServiceConfig { - string service = 1; + string zone_id = 1; + string service = 2; } message ZoneNetworkConfig { @@ -305,7 +306,7 @@ message NetworkReservation { } message ServiceEntry { - string uuid = 1; + string zone_id = 1; string service_name = 2; } diff --git a/protect/control/v1/control.proto b/protect/control/v1/control.proto index ce1b2a1..d729e9f 100644 --- a/protect/control/v1/control.proto +++ b/protect/control/v1/control.proto @@ -614,14 +614,13 @@ message ConfigureZoneNetworkRequest { message ConfigureZoneNetworkReply {} message AdvertiseZoneServiceRequest { - string zone_id = 1; + string uuid = 1; ZoneServiceConfig config = 2; } message AdvertiseZoneServiceReply {} message UnadvertiseZoneServiceRequest { - string zone_id = 1; ZoneServiceConfig config = 2; }