diff --git a/clustertool/cmd/flux.go b/clustertool/cmd/flux.go new file mode 100644 index 00000000000..77cd3a5c038 --- /dev/null +++ b/clustertool/cmd/flux.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "strings" + + "github.com/spf13/cobra" +) + +var fluxLongHelp = strings.TrimSpace(` +These are all commands that can be used to maintain FluxCD + +`) + +var fluxCmd = &cobra.Command{ + Use: "flux", + Short: "Commands for handling FluxCD", + Example: "clustertool flux bootstrap", + Long: advLongHelp, + SilenceUsage: true, + SilenceErrors: true, +} + +func init() { + RootCmd.AddCommand(fluxCmd) +} diff --git a/clustertool/cmd/fluxbootstrap.go b/clustertool/cmd/flux_bootstrap.go similarity index 87% rename from clustertool/cmd/fluxbootstrap.go rename to clustertool/cmd/flux_bootstrap.go index 259b7d1b83a..3a35eb9b3ef 100644 --- a/clustertool/cmd/fluxbootstrap.go +++ b/clustertool/cmd/flux_bootstrap.go @@ -16,9 +16,9 @@ var fluxBootstrapLongHelp = strings.TrimSpace(` `) var fluxbootstrap = &cobra.Command{ - Use: "fluxbootstrap", + Use: "bootstrap", Short: "Manually bootstrap fluxcd on existing cluster", - Example: "clustertool fluxbootstrap", + Example: "clustertool flux bootstrap", Long: fluxBootstrapLongHelp, Run: func(cmd *cobra.Command, args []string) { ctx := context.Background() @@ -32,5 +32,5 @@ var fluxbootstrap = &cobra.Command{ } func init() { - RootCmd.AddCommand(fluxbootstrap) + fluxCmd.AddCommand(fluxbootstrap) } diff --git a/clustertool/cmd/talos.go b/clustertool/cmd/talos.go new file mode 100644 index 00000000000..ec05df3531b --- /dev/null +++ b/clustertool/cmd/talos.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "strings" + + "github.com/spf13/cobra" +) + +var talosLongHelp = strings.TrimSpace(` +These are all commands that can be used to maintain Talos OS + +`) + +var talosCmd = &cobra.Command{ + Use: "talos", + Short: "Commands for handling Talos OS", + Example: "clustertool talos apply", + Long: advLongHelp, + SilenceUsage: true, + SilenceErrors: true, +} + +func init() { + RootCmd.AddCommand(talosCmd) +} diff --git a/clustertool/cmd/apply.go b/clustertool/cmd/talos_apply.go similarity index 98% rename from clustertool/cmd/apply.go rename to clustertool/cmd/talos_apply.go index 8e0584e214f..d84421fe0bf 100644 --- a/clustertool/cmd/apply.go +++ b/clustertool/cmd/talos_apply.go @@ -44,7 +44,7 @@ Not any contained helm-charts var apply = &cobra.Command{ Use: "apply", - Short: "apply TalosConfig", + Short: "apply", Example: "clustertool apply ", Long: applyLongHelp, Run: func(cmd *cobra.Command, args []string) { @@ -115,5 +115,5 @@ func RunApply(kubeconfig bool, node string, extraArgs []string) { } func init() { - RootCmd.AddCommand(apply) + talosCmd.AddCommand(apply) } diff --git a/clustertool/cmd/adv_bootstrap.go b/clustertool/cmd/talos_bootstrap.go similarity index 93% rename from clustertool/cmd/adv_bootstrap.go rename to clustertool/cmd/talos_bootstrap.go index 54dfc582147..60bf99b9ba7 100644 --- a/clustertool/cmd/adv_bootstrap.go +++ b/clustertool/cmd/talos_bootstrap.go @@ -24,5 +24,5 @@ func bootstrapfunc(cmd *cobra.Command, args []string) { } func init() { - adv.AddCommand(bootstrap) + talosCmd.AddCommand(bootstrap) } diff --git a/clustertool/cmd/adv_health.go b/clustertool/cmd/talos_health.go similarity index 96% rename from clustertool/cmd/adv_health.go rename to clustertool/cmd/talos_health.go index 2a2cf558e0b..3af6b2abeec 100644 --- a/clustertool/cmd/adv_health.go +++ b/clustertool/cmd/talos_health.go @@ -30,5 +30,5 @@ var health = &cobra.Command{ } func init() { - adv.AddCommand(health) + talosCmd.AddCommand(health) } diff --git a/clustertool/cmd/adv_reset.go b/clustertool/cmd/talos_reset.go similarity index 97% rename from clustertool/cmd/adv_reset.go rename to clustertool/cmd/talos_reset.go index 12806a29af1..bbd9a05e0bd 100644 --- a/clustertool/cmd/adv_reset.go +++ b/clustertool/cmd/talos_reset.go @@ -45,5 +45,5 @@ var reset = &cobra.Command{ } func init() { - adv.AddCommand(reset) + talosCmd.AddCommand(reset) } diff --git a/clustertool/cmd/upgrade.go b/clustertool/cmd/talos_upgrade.go similarity index 98% rename from clustertool/cmd/upgrade.go rename to clustertool/cmd/talos_upgrade.go index a8798022a28..94360d1a5f8 100644 --- a/clustertool/cmd/upgrade.go +++ b/clustertool/cmd/talos_upgrade.go @@ -58,5 +58,5 @@ var upgrade = &cobra.Command{ } func init() { - RootCmd.AddCommand(upgrade) + talosCmd.AddCommand(upgrade) }