m/node: implement static network config
Allows using a static network configuration in Monogon OS.
This plumbs in support for the new static network configuration mode of
the network service into Monogon OS. It introduces a new NodeParameter
field as well as an ESP file to persistently hold this configuration.
The file is not sealed or encrypted to allow recovery of nodes with
broken network configuration.
Change-Id: Ia398368a8d1c0eef4bca53bb279a97a144bdbd20
Reviewed-on: https://review.monogon.dev/c/monogon/+/1403
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/proto/api/BUILD.bazel b/metropolis/proto/api/BUILD.bazel
index a333b96..d9e94e1 100644
--- a/metropolis/proto/api/BUILD.bazel
+++ b/metropolis/proto/api/BUILD.bazel
@@ -14,6 +14,7 @@
deps = [
"//metropolis/proto/common:common_proto",
"//metropolis/proto/ext:ext_proto",
+ "//net/proto:net_proto_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:timestamp_proto",
],
@@ -28,6 +29,7 @@
deps = [
"//metropolis/proto/common",
"//metropolis/proto/ext",
+ "//net/proto",
],
)
diff --git a/metropolis/proto/api/configuration.proto b/metropolis/proto/api/configuration.proto
index 9ff1c43..3a4a5cd 100644
--- a/metropolis/proto/api/configuration.proto
+++ b/metropolis/proto/api/configuration.proto
@@ -19,6 +19,7 @@
option go_package = "source.monogon.dev/metropolis/proto/api";
import "metropolis/proto/common/common.proto";
+import "net/proto/net.proto";
// NodeParameters is the data with which a Node is set booted. It contains the
// configuration required for a node to either bootstrap a new cluster, or
@@ -61,4 +62,8 @@
ClusterBootstrap cluster_bootstrap = 1;
ClusterRegister cluster_register = 2;
}
+
+ // Optional network configuration when autoconfiguration is not possible or
+ // desirable. If unset, autoconfiguration (ie. DHCP) is used.
+ net.proto.Net network_config = 4;
}