Skip to content

Commit

Permalink
Merge branch 'main' into EVEREST-107-auto-update-base-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 17, 2025
2 parents dd77305 + 5baa3f2 commit e564ba6
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] NAMESPACES",
Long: "Add a new namespace",
Short: "Add a new namespace",
Example: `everestctl namespaces add [NAMESPACE] [FLAGS]`,
Example: `everestctl namespaces add --operator.mongodb=true --operator.postgresql=false --operator.xtradb-cluster=false --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 e564ba6

Please sign in to comment.