Skip to content

Commit

Permalink
EVEREST-1778 Extend help message for CLI namespace add command
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkondr committed Jan 10, 2025
1 parent af8b049 commit e26ad71
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions commands/namespaces/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ var (
// NewAddCommand returns a new command to add a new namespace.
func NewAddCommand(l *zap.SugaredLogger) *cobra.Command {
cmd := &cobra.Command{
Use: "add",
Use: "add [flags] namespace",
Long: "Add a new namespace",
Short: "Add a new namespace",
Example: `everestctl namespaces add [NAMESPACE] [FLAGS]`,
Example: `everestctl namespaces add --operator.mongodb=true --skip-wizard ns-1,ns-2`,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
initAddViperFlags(cmd)
c := &namespaces.NamespaceAddConfig{}
Expand All @@ -39,12 +40,7 @@ func NewAddCommand(l *zap.SugaredLogger) *cobra.Command {
}
bindInstallHelmOpts(c)

if len(args) != 1 {
output.PrintError(fmt.Errorf("invalid number of arguments: expected 1, got %d", len(args)), l, true)
os.Exit(1)
}
c.Namespaces = args[0]

enableLogging := viper.GetBool("verbose") || viper.GetBool("json")
c.Pretty = !enableLogging

Expand Down

0 comments on commit e26ad71

Please sign in to comment.