diff --git a/cmd/root.go b/cmd/root.go index 1d692939..aabee17b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -27,6 +27,7 @@ func New(configOptions *ConfigOptions) *cobra.Command { rootCmd := &cobra.Command{ Use: "event-generator", Short: "A command line tool to perform a variety of suspect actions.", + DisableAutoGenTag: true, PersistentPreRun: func(c *cobra.Command, args []string) { // PersistentPreRun runs before flags validation but after args validation. // Do not assume initialization completed during args validation. diff --git a/cmd/run.go b/cmd/run.go index 2deaa9fb..d5a88ae4 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -5,8 +5,8 @@ import ( "regexp" "github.com/falcosecurity/event-generator/events" - _ "github.com/falcosecurity/event-generator/events/k8saudit" - _ "github.com/falcosecurity/event-generator/events/syscall" + _ "github.com/falcosecurity/event-generator/events/k8saudit" // needs a comment justifying it + _ "github.com/falcosecurity/event-generator/events/syscall" // needs a comment justifying it "github.com/falcosecurity/event-generator/pkg/runner" logger "github.com/sirupsen/logrus" "github.com/spf13/cobra" @@ -14,14 +14,16 @@ import ( cmdutil "k8s.io/kubectl/pkg/cmd/util" ) +// DefaultNamespace const contains the name of the default Kubernetes namespace. const DefaultNamespace = "default" +// NewRun instantiates the run subcommand. func NewRun() *cobra.Command { - c := &cobra.Command{ - Use: "run [regexp]", - Short: "Run actions", - Args: cobra.MaximumNArgs(1), + Use: "run [regexp]", + Short: "Run actions", + Args: cobra.MaximumNArgs(1), + DisableAutoGenTag: true, } flags := c.Flags()