cluster: derive default machine name from its hostname when adding to cluster

This commit is contained in:
Pasha Sviderski
2026-06-19 16:54:59 +10:00
parent e3823c29bf
commit 0c42a7df65
8 changed files with 352 additions and 203 deletions
+2 -1
View File
@@ -71,7 +71,8 @@ Connection methods:
return add(cmd.Context(), uncli, remoteMachine, opts)
},
}
cmd.Flags().StringVarP(&opts.name, "name", "n", "", "Assign a name to the machine.")
cmd.Flags().StringVarP(&opts.name, "name", "n", "",
"Assign a name to the machine. (default is the machine's hostname)")
cmd.Flags().BoolVar(
&opts.noCaddy, "no-caddy", false,
"Don't deploy Caddy reverse proxy service to the machine.",
+1 -1
View File
@@ -101,7 +101,7 @@ Connection methods:
"API endpoint for the Uncloud DNS service.")
cmd.Flags().StringVarP(
&opts.name, "name", "n", "",
"Assign a name to the machine.",
"Assign a name to the machine. (default is the machine's hostname)",
)
cmd.Flags().StringVar(
&opts.network, "network", cluster.DefaultNetwork.String(),