Add undeploy command: full inverse of deploy

Implements `mcp undeploy <service>` which tears down all infrastructure
for a service: removes mc-proxy routes, DNS records, TLS certificates,
stops and removes containers, releases allocated ports, and marks the
service inactive.

This fills the gap between `stop` (temporary pause) and `purge` (registry
cleanup). Undeploy is the complete teardown that returns the node to the
state before the service was deployed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 21:45:42 -07:00
parent b2eaa69619
commit f932dd64cc
8 changed files with 610 additions and 150 deletions

View File

@@ -8,6 +8,7 @@ import "google/protobuf/timestamp.proto";
service McpAgentService {
// Service lifecycle
rpc Deploy(DeployRequest) returns (DeployResponse);
rpc UndeployService(UndeployServiceRequest) returns (UndeployServiceResponse);
rpc StopService(StopServiceRequest) returns (StopServiceResponse);
rpc StartService(StartServiceRequest) returns (StartServiceResponse);
rpc RestartService(RestartServiceRequest) returns (RestartServiceResponse);
@@ -102,6 +103,14 @@ message RestartServiceResponse {
repeated ComponentResult results = 1;
}
message UndeployServiceRequest {
string name = 1;
}
message UndeployServiceResponse {
repeated ComponentResult results = 1;
}
// --- Desired state ---
message SyncDesiredStateRequest {