Skip to content

Commit

Permalink
docs: how to download generic talosconfig in omnictl talosconfig help
Browse files Browse the repository at this point in the history
It wasn't clear that you can omit the cluster flag and to get a generic
talosconfig that worked with maintenance mode machines.

Signed-off-by: Ethan Norlander <[email protected]>
  • Loading branch information
UnknownBlunders authored and Unix4ever committed Feb 18, 2025
1 parent 7e32dcc commit 2108697
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/pkg/omnictl/talosconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ var talosconfigCmdFlags struct {
// talosconfigCmd represents the get (resources) command.
var talosconfigCmd = &cobra.Command{
Use: "talosconfig [local-path]",
Short: "Download the admin talosconfig of a cluster",
Long: `Download the admin talosconfig of a cluster.
Short: "Download an admin talosconfig.",
Long: `Download the generic admin talosconfig of the Omni instance or the admin talosconfig of a cluster.
Generic talosconfig can be used with any machine, including those in maintenance mode.
If merge flag is defined, config will be merged with ~/.talos/config or [local-path] if specified.
Otherwise talosconfig will be written to PWD or [local-path] if specified.`,
Args: cobra.MaximumNArgs(1),
Expand Down Expand Up @@ -139,7 +140,7 @@ func getTalosconfig(args []string) func(ctx context.Context, client *client.Clie
}

func init() {
talosconfigCmd.Flags().StringVarP(&talosconfigCmdFlags.cluster, "cluster", "c", "", "cluster to use")
talosconfigCmd.Flags().StringVarP(&talosconfigCmdFlags.cluster, "cluster", "c", "", "cluster to use. If omitted, download the generic talosconfig for the Omni instance.")
talosconfigCmd.Flags().BoolVarP(&talosconfigCmdFlags.force, "force", "f", false, "force overwrite of talosconfig if already present")
talosconfigCmd.Flags().BoolVarP(&talosconfigCmdFlags.merge, "merge", "m", true, "merge with existing talosconfig")
talosconfigCmd.Flags().BoolVar(&talosconfigCmdFlags.breakGlass, "break-glass", false, "get operator talosconfig that allows bypassing Omni (if enabled for the account)")
Expand Down

0 comments on commit 2108697

Please sign in to comment.