m/t/launch/cluster: allow specifying InitialClusterConfiguration

This allows different tests to run clusters with different
ClusterConfigurations.

Change-Id: I159ced96e95c6762c493c590e596c1a8dd94b35d
Reviewed-on: https://review.monogon.dev/c/monogon/+/2941
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/test/launch/cluster/cluster.go b/metropolis/test/launch/cluster/cluster.go
index 32c351f..436a27f 100644
--- a/metropolis/test/launch/cluster/cluster.go
+++ b/metropolis/test/launch/cluster/cluster.go
@@ -548,6 +548,12 @@
 	// pull images from. This is a more efficient alternative to preseeding all
 	// images used for testing.
 	LocalRegistry *localregistry.Server
+
+	// InitialClusterConfiguration will be passed to the first node when creating the
+	// cluster, and defines some basic properties of the cluster. If not specified,
+	// the cluster will default to defaults as defined in
+	// metropolis.proto.api.NodeParameters.
+	InitialClusterConfiguration *cpb.ClusterConfiguration
 }
 
 // Cluster is the running Metropolis cluster launched using the LaunchCluster
@@ -757,7 +763,8 @@
 		NodeParameters: &apb.NodeParameters{
 			Cluster: &apb.NodeParameters_ClusterBootstrap_{
 				ClusterBootstrap: &apb.NodeParameters_ClusterBootstrap{
-					OwnerPublicKey: InsecurePublicKey,
+					OwnerPublicKey:              InsecurePublicKey,
+					InitialClusterConfiguration: opts.InitialClusterConfiguration,
 				},
 			},
 		},