diff --git a/pkg/cmd/create/cmd.go b/pkg/cmd/create/cmd.go index c9bd369cc..dfc7b59da 100644 --- a/pkg/cmd/create/cmd.go +++ b/pkg/cmd/create/cmd.go @@ -8,7 +8,6 @@ import ( "github.com/go-logr/logr" "github.com/spf13/cobra" - "github.com/maistra/istio-workspace/pkg/cmd" "github.com/maistra/istio-workspace/pkg/cmd/config" internal "github.com/maistra/istio-workspace/pkg/cmd/internal/session" "github.com/maistra/istio-workspace/pkg/log" @@ -21,11 +20,8 @@ var logger = func() logr.Logger { // NewCmd creates instance of "create" Cobra Command with flags and execution logic defined. func NewCmd() *cobra.Command { createCmd := &cobra.Command{ - Use: "create", - Short: "Creates a new Session", - Annotations: map[string]string{ - cmd.AnnotationOperatorRequired: "true", - }, + Use: "create", + Short: "Creates a new Session", SilenceUsage: true, PreRunE: func(cmd *cobra.Command, args []string) error { return errors.Wrap(config.SyncFullyQualifiedFlags(cmd), "failed syncing flags") diff --git a/pkg/cmd/delete/cmd.go b/pkg/cmd/delete/cmd.go index 4c4198818..21f7b5857 100644 --- a/pkg/cmd/delete/cmd.go +++ b/pkg/cmd/delete/cmd.go @@ -5,7 +5,6 @@ import ( "github.com/go-logr/logr" "github.com/spf13/cobra" - "github.com/maistra/istio-workspace/pkg/cmd" "github.com/maistra/istio-workspace/pkg/cmd/config" internal "github.com/maistra/istio-workspace/pkg/cmd/internal/session" "github.com/maistra/istio-workspace/pkg/log" @@ -21,9 +20,6 @@ func NewCmd() *cobra.Command { Use: "delete", Short: "Deletes an existing Session", SilenceUsage: true, - Annotations: map[string]string{ - cmd.AnnotationOperatorRequired: "true", - }, PreRunE: func(cmd *cobra.Command, args []string) error { return errors.Wrap(config.SyncFullyQualifiedFlags(cmd), "failed syncing flags") },