diff --git a/changelogs/unreleased/1561-prydonius b/changelogs/unreleased/1561-prydonius new file mode 100644 index 000000000..d43890e48 --- /dev/null +++ b/changelogs/unreleased/1561-prydonius @@ -0,0 +1 @@ +Hides `velero server` and `velero restic server` commands from the list of available commands as these are not intended for use by the velero CLI user. diff --git a/pkg/cmd/cli/restic/server.go b/pkg/cmd/cli/restic/server.go index 6aaba155b..49b067e9a 100644 --- a/pkg/cmd/cli/restic/server.go +++ b/pkg/cmd/cli/restic/server.go @@ -46,9 +46,10 @@ func NewServerCommand(f client.Factory) *cobra.Command { logLevelFlag := logging.LogLevelFlag(logrus.InfoLevel) command := &cobra.Command{ - Use: "server", - Short: "Run the velero restic server", - Long: "Run the velero restic server", + Use: "server", + Short: "Run the velero restic server", + Long: "Run the velero restic server", + Hidden: true, Run: func(c *cobra.Command, args []string) { logLevel := logLevelFlag.Parse() logrus.Infof("Setting log-level to %s", strings.ToUpper(logLevel.String())) diff --git a/pkg/cmd/server/server.go b/pkg/cmd/server/server.go index 5970ca16d..7d98b0264 100644 --- a/pkg/cmd/server/server.go +++ b/pkg/cmd/server/server.go @@ -147,9 +147,10 @@ func NewCommand() *cobra.Command { ) var command = &cobra.Command{ - Use: "server", - Short: "Run the velero server", - Long: "Run the velero server", + Use: "server", + Short: "Run the velero server", + Long: "Run the velero server", + Hidden: true, Run: func(c *cobra.Command, args []string) { // go-plugin uses log.Println to log when it's waiting for all plugin processes to complete so we need to // set its output to stdout.