hide server commands in velero CLI (#1561)

* hide server commands in velero CLI

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* remove unnecessary comment

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
pull/1564/head
Adnan Abdulhussein 2019-06-10 18:20:17 -07:00 committed by Steve Kriss
parent e183c4b597
commit 74b575200c
3 changed files with 9 additions and 6 deletions

View File

@ -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.

View File

@ -49,6 +49,7 @@ func NewServerCommand(f client.Factory) *cobra.Command {
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()))

View File

@ -150,6 +150,7 @@ func NewCommand() *cobra.Command {
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.