m/c/metroctl: implement multi-node installation
This enables metroctl to include the ClusterRegister part of
NodeParameters in generated installer images, making it possible for
newly installed nodes to join an existing cluster.
Change-Id: I648207d70a4bec2ed7acf42e02f2b2c93319f559
Reviewed-on: https://review.monogon.dev/c/monogon/+/822
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/cli/metroctl/main.go b/metropolis/cli/metroctl/main.go
index 29d44e8..d575c5b 100644
--- a/metropolis/cli/metroctl/main.go
+++ b/metropolis/cli/metroctl/main.go
@@ -10,6 +10,18 @@
Short: "metroctl controls Metropolis nodes and clusters.",
}
+type metroctlFlags struct {
+ // clusterEndpoints is a list of the targeted cluster's endpoints, used by
+ // commands that perform RPC on it.
+ clusterEndpoints []string
+}
+
+var flags metroctlFlags
+
+func init() {
+ rootCmd.PersistentFlags().StringArrayVar(&flags.clusterEndpoints, "endpoints", nil, "A list of the target cluster's endpoints.")
+}
+
func main() {
cobra.CheckErr(rootCmd.Execute())
}