Support injecting container images for development

This adds the LoadImage RPC and an accompanying subcommand
to the debug API which allows loading images into
an existing Metropolis node for
development or testing.

Change-Id: I51d802630ae4c95fb874e01bfb6510ab69c322e1
Reviewed-on: https://review.monogon.dev/c/monogon/+/219
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/proto/api/debug.proto b/metropolis/proto/api/debug.proto
index 6cbe32b..eabc766 100644
--- a/metropolis/proto/api/debug.proto
+++ b/metropolis/proto/api/debug.proto
@@ -42,8 +42,19 @@
 
     // Trace enables tracing of Metropolis using the Linux ftrace infrastructure.
     rpc Trace(TraceRequest) returns (stream TraceEvent);
+
+    // LoadImage loads an uncompressed tarball containing a Docker v1.1, v1.2 or OCI v1 image into the local
+    // containerd image store. The client streams the tarball in arbitrary-sized chunks and closes the sending side
+    // once it has sent the entire image. The server then either returns an empty response if successful or a gRPC error.
+    rpc LoadImage(stream ImagePart) returns (LoadImageResponse);
 }
 
+message ImagePart {
+    bytes data_part = 1;
+}
+
+message LoadImageResponse {
+}
 
 message GetDebugKubeconfigRequest {
     string id = 1; // Kubernetes identity (user)