diff --git a/docs/src/_parts/commands/k8s.md b/docs/src/_parts/commands/k8s.md index cf6bdf7b9..618e28f91 100644 --- a/docs/src/_parts/commands/k8s.md +++ b/docs/src/_parts/commands/k8s.md @@ -6,8 +6,8 @@ Canonical Kubernetes CLI ``` -h, --help help for k8s - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_bootstrap.md b/docs/src/_parts/commands/k8s_bootstrap.md index f9573f1d6..562e131e4 100644 --- a/docs/src/_parts/commands/k8s_bootstrap.md +++ b/docs/src/_parts/commands/k8s_bootstrap.md @@ -14,7 +14,7 @@ k8s bootstrap [flags] ``` --address string microcluster address, defaults to the node IP address - --config string path to the YAML file containing your custom cluster bootstrap configuration. + --file string path to the YAML file containing your custom cluster bootstrap configuration. -h, --help help for bootstrap --interactive interactively configure the most important cluster options --name string node name, defaults to hostname @@ -23,8 +23,8 @@ k8s bootstrap [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_completion.md b/docs/src/_parts/commands/k8s_completion.md index b9c1ae843..16d363b92 100644 --- a/docs/src/_parts/commands/k8s_completion.md +++ b/docs/src/_parts/commands/k8s_completion.md @@ -17,8 +17,8 @@ See each sub-command's help for details on how to use the generated script. ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_completion_bash.md b/docs/src/_parts/commands/k8s_completion_bash.md index 6be9f618f..7090a558d 100644 --- a/docs/src/_parts/commands/k8s_completion_bash.md +++ b/docs/src/_parts/commands/k8s_completion_bash.md @@ -40,8 +40,8 @@ k8s completion bash ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_completion_fish.md b/docs/src/_parts/commands/k8s_completion_fish.md index fcbd21e1e..9d244e63b 100644 --- a/docs/src/_parts/commands/k8s_completion_fish.md +++ b/docs/src/_parts/commands/k8s_completion_fish.md @@ -31,8 +31,8 @@ k8s completion fish [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_completion_powershell.md b/docs/src/_parts/commands/k8s_completion_powershell.md index 7a8a06801..7904604ab 100644 --- a/docs/src/_parts/commands/k8s_completion_powershell.md +++ b/docs/src/_parts/commands/k8s_completion_powershell.md @@ -28,8 +28,8 @@ k8s completion powershell [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_completion_zsh.md b/docs/src/_parts/commands/k8s_completion_zsh.md index e4aef6386..586c3d637 100644 --- a/docs/src/_parts/commands/k8s_completion_zsh.md +++ b/docs/src/_parts/commands/k8s_completion_zsh.md @@ -42,8 +42,8 @@ k8s completion zsh [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_config.md b/docs/src/_parts/commands/k8s_config.md index 8fda5e5b9..8dd685df9 100644 --- a/docs/src/_parts/commands/k8s_config.md +++ b/docs/src/_parts/commands/k8s_config.md @@ -16,8 +16,8 @@ k8s config [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_disable.md b/docs/src/_parts/commands/k8s_disable.md index 914d5428c..6f305cc97 100644 --- a/docs/src/_parts/commands/k8s_disable.md +++ b/docs/src/_parts/commands/k8s_disable.md @@ -19,8 +19,8 @@ k8s disable ... [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_enable.md b/docs/src/_parts/commands/k8s_enable.md index edf9e2243..204f078e8 100644 --- a/docs/src/_parts/commands/k8s_enable.md +++ b/docs/src/_parts/commands/k8s_enable.md @@ -19,8 +19,8 @@ k8s enable ... [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_get-join-token.md b/docs/src/_parts/commands/k8s_get-join-token.md index e5e0be461..706fa5879 100644 --- a/docs/src/_parts/commands/k8s_get-join-token.md +++ b/docs/src/_parts/commands/k8s_get-join-token.md @@ -16,8 +16,8 @@ k8s get-join-token [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_get.md b/docs/src/_parts/commands/k8s_get.md index 70a945025..2cd8cbe94 100644 --- a/docs/src/_parts/commands/k8s_get.md +++ b/docs/src/_parts/commands/k8s_get.md @@ -19,8 +19,8 @@ k8s get [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_join-cluster.md b/docs/src/_parts/commands/k8s_join-cluster.md index 8362631d0..ae8b918cc 100644 --- a/docs/src/_parts/commands/k8s_join-cluster.md +++ b/docs/src/_parts/commands/k8s_join-cluster.md @@ -17,8 +17,8 @@ k8s join-cluster [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_kubectl.md b/docs/src/_parts/commands/k8s_kubectl.md index 1119ef7a1..131470387 100644 --- a/docs/src/_parts/commands/k8s_kubectl.md +++ b/docs/src/_parts/commands/k8s_kubectl.md @@ -15,8 +15,8 @@ k8s kubectl [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_remove-node.md b/docs/src/_parts/commands/k8s_remove-node.md index 0fb7e111d..0e8b7fb5e 100644 --- a/docs/src/_parts/commands/k8s_remove-node.md +++ b/docs/src/_parts/commands/k8s_remove-node.md @@ -16,8 +16,8 @@ k8s remove-node [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_set.md b/docs/src/_parts/commands/k8s_set.md index 6f89093f5..9a5836ca9 100644 --- a/docs/src/_parts/commands/k8s_set.md +++ b/docs/src/_parts/commands/k8s_set.md @@ -20,8 +20,8 @@ k8s set ... [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/docs/src/_parts/commands/k8s_status.md b/docs/src/_parts/commands/k8s_status.md index fbe07e029..d34d669e4 100644 --- a/docs/src/_parts/commands/k8s_status.md +++ b/docs/src/_parts/commands/k8s_status.md @@ -16,8 +16,8 @@ k8s status [flags] ### Options inherited from parent commands ``` - -o, --output-format string set the output format to one of plain, json or yaml (default "plain") - -t, --timeout duration the max time to wait for the command to execute (default 1m30s) + --output-format string set the output format to one of plain, json or yaml (default "plain") + --timeout duration the max time to wait for the command to execute (default 1m30s) ``` ### SEE ALSO diff --git a/src/k8s/cmd/k8s/k8s.go b/src/k8s/cmd/k8s/k8s.go index f1743726c..bb9e77ec0 100644 --- a/src/k8s/cmd/k8s/k8s.go +++ b/src/k8s/cmd/k8s/k8s.go @@ -61,8 +61,8 @@ func NewRootCmd(env cmdutil.ExecutionEnvironment) *cobra.Command { cmd.PersistentFlags().StringVar(&opts.stateDir, "state-dir", "", "directory with the dqlite datastore") cmd.PersistentFlags().BoolVarP(&opts.logDebug, "debug", "d", false, "show all debug messages") cmd.PersistentFlags().BoolVarP(&opts.logVerbose, "verbose", "v", true, "show all information messages") - cmd.PersistentFlags().StringVarP(&opts.outputFormat, "output-format", "o", "plain", "set the output format to one of plain, json or yaml") - cmd.PersistentFlags().DurationVarP(&opts.timeout, "timeout", "t", 90*time.Second, "the max time to wait for the command to execute") + cmd.PersistentFlags().StringVar(&opts.outputFormat, "output-format", "plain", "set the output format to one of plain, json or yaml") + cmd.PersistentFlags().DurationVar(&opts.timeout, "timeout", 90*time.Second, "the max time to wait for the command to execute") // By default, the state dir is set to a fixed directory in the snap. // This shouldn't be overwritten by the user. diff --git a/src/k8s/cmd/k8s/k8s_bootstrap.go b/src/k8s/cmd/k8s/k8s_bootstrap.go index 043c30b69..7a291533d 100644 --- a/src/k8s/cmd/k8s/k8s_bootstrap.go +++ b/src/k8s/cmd/k8s/k8s_bootstrap.go @@ -44,7 +44,7 @@ func newBootstrapCmd(env cmdutil.ExecutionEnvironment) *cobra.Command { PreRun: chainPreRunHooks(hookRequireRoot(env)), Run: func(cmd *cobra.Command, args []string) { if opts.interactive && opts.configFile != "" { - cmd.PrintErrln("Error: --interactive and --config flags cannot be set at the same time.") + cmd.PrintErrln("Error: --interactive and --file flags cannot be set at the same time.") env.Exit(1) return } @@ -118,9 +118,10 @@ func newBootstrapCmd(env cmdutil.ExecutionEnvironment) *cobra.Command { } cmd.PersistentFlags().BoolVar(&opts.interactive, "interactive", false, "interactively configure the most important cluster options") - cmd.PersistentFlags().StringVar(&opts.configFile, "config", "", "path to the YAML file containing your custom cluster bootstrap configuration.") + cmd.PersistentFlags().StringVar(&opts.configFile, "file", "", "path to the YAML file containing your custom cluster bootstrap configuration.") cmd.Flags().StringVar(&opts.name, "name", "", "node name, defaults to hostname") cmd.Flags().StringVar(&opts.address, "address", "", "microcluster address, defaults to the node IP address") + return cmd }