diff --git a/cmd/driver/cleanup/cleanup.go b/cmd/driver/cleanup/cleanup.go index 32b12092e..342f111d5 100644 --- a/cmd/driver/cleanup/cleanup.go +++ b/cmd/driver/cleanup/cleanup.go @@ -36,8 +36,9 @@ func NewDriverCleanupCmd(ctx context.Context, opt *options.Common) *cobra.Comman cmd := &cobra.Command{ Use: "cleanup [flags]", DisableFlagsInUseLine: true, - Short: "Cleanup a driver", - Long: "Cleans a driver up, eg for kmod, by removing it from dkms.", + Short: "[Preview] Cleanup a driver", + Long: `[Preview] Cleans a driver up, eg for kmod, by removing it from dkms. +** This command is in preview and under development. **`, RunE: func(cmd *cobra.Command, args []string) error { return o.RunDriverCleanup(ctx) }, diff --git a/cmd/driver/config/config.go b/cmd/driver/config/config.go index 818bc3a67..63285a612 100644 --- a/cmd/driver/config/config.go +++ b/cmd/driver/config/config.go @@ -43,10 +43,11 @@ import ( const ( configMapEngineKindKey = "engine.kind" - longConfig = `Configure a driver for future usages with other driver subcommands. + longConfig = `[Preview] Configure a driver for future usages with other driver subcommands. It will also update local Falco configuration or k8s configmap depending on the environment where it is running, to let Falco use chosen driver. Only supports deployments of Falco that use a driver engine, ie: one between kmod, ebpf and modern-ebpf. If engine.kind key is set to a non-driver driven engine, Falco configuration won't be touched. +** This command is in preview and under development. ** ` ) @@ -72,7 +73,7 @@ func NewDriverConfigCmd(ctx context.Context, opt *options.Common) *cobra.Command cmd := &cobra.Command{ Use: "config [flags]", DisableFlagsInUseLine: true, - Short: "Configure a driver", + Short: "[Preview] Configure a driver", Long: longConfig, RunE: func(cmd *cobra.Command, args []string) error { return o.RunDriverConfig(ctx, cmd) diff --git a/cmd/driver/config/config_test.go b/cmd/driver/config/config_test.go index 4edf09bca..4a3b8fdd4 100644 --- a/cmd/driver/config/config_test.go +++ b/cmd/driver/config/config_test.go @@ -25,7 +25,31 @@ import ( "github.com/falcosecurity/falcoctl/cmd" ) -var driverConfigHelp = `Configure a driver for future usages with other driver subcommands.` +var driverConfigHelp = `[Preview] Configure a driver for future usages with other driver subcommands. +It will also update local Falco configuration or k8s configmap depending on the environment where it is running, to let Falco use chosen driver. +Only supports deployments of Falco that use a driver engine, ie: one between kmod, ebpf and modern-ebpf. +If engine.kind key is set to a non-driver driven engine, Falco configuration won't be touched. +** This command is in preview and under development. ** + +Usage: + falcoctl driver config [flags] + +Flags: + -h, --help help for config + --host-root string Driver host root to be configured. (default "/") + --kubeconfig string Kubernetes config. + --name string Driver name to be configured. (default "falco") + --namespace string Kubernetes namespace. + --repo strings Driver repo to be configured. (default [https://download.falco.org/driver]) + --type string Driver type to be configured (auto, ebpf, kmod, modern_ebpf) (default "kmod") + --update-falco Whether to update Falco config/configmap. (default true) + --version string Driver version to be configured. + +Global Flags: + --config string config file to be used for falcoctl (default "/etc/falcoctl/falcoctl.yaml") + --log-format string Set formatting for logs (color, text, json) (default "color") + --log-level string Set level for logs (info, warn, debug, trace) (default "info") +` var addAssertFailedBehavior = func(specificError string) { It("check that fails and the usage is not printed", func() { @@ -58,7 +82,7 @@ var _ = Describe("config", func() { }) It("should match the saved one", func() { - Expect(output).Should(gbytes.Say(driverConfigHelp)) + Expect(output).Should(gbytes.Say(regexp.QuoteMeta(driverConfigHelp))) }) }) diff --git a/cmd/driver/driver_linux.go b/cmd/driver/driver_linux.go index 945b05c2d..c36fda14c 100644 --- a/cmd/driver/driver_linux.go +++ b/cmd/driver/driver_linux.go @@ -36,8 +36,9 @@ func NewDriverCmd(ctx context.Context, opt *commonoptions.Common) *cobra.Command cmd := &cobra.Command{ Use: "driver", DisableFlagsInUseLine: true, - Short: "Interact with falcosecurity driver", - Long: "Interact with falcosecurity driver", + Short: "[Preview] Interact with falcosecurity driver", + Long: `[Preview] Interact with falcosecurity driver. +** This command is in preview and under development. **`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { opt.Initialize() return config.Load(opt.ConfigFile) diff --git a/cmd/driver/install/install.go b/cmd/driver/install/install.go index f1d69054f..09fb0a637 100644 --- a/cmd/driver/install/install.go +++ b/cmd/driver/install/install.go @@ -60,8 +60,9 @@ func NewDriverInstallCmd(ctx context.Context, opt *options.Common) *cobra.Comman cmd := &cobra.Command{ Use: "install [flags]", DisableFlagsInUseLine: true, - Short: "Install previously configured driver", - Long: "Install previously configured driver, either downloading it or attempting a build", + Short: "[Preview] Install previously configured driver", + Long: `[Preview] Install previously configured driver, either downloading it or attempting a build. +** This command is in preview and under development. **`, RunE: func(cmd *cobra.Command, args []string) error { driver, err := config.Driverer() if err != nil { diff --git a/cmd/driver/printenv/printenv.go b/cmd/driver/printenv/printenv.go index df7ef81eb..868305cb4 100644 --- a/cmd/driver/printenv/printenv.go +++ b/cmd/driver/printenv/printenv.go @@ -41,8 +41,9 @@ func NewDriverPrintenvCmd(ctx context.Context, opt *options.Common) *cobra.Comma cmd := &cobra.Command{ Use: "printenv [flags]", DisableFlagsInUseLine: true, - Short: "Print env vars", - Long: "Print variables used by driver as env vars.", + Short: "[Preview] Print env vars", + Long: `[Preview] Print variables used by driver as env vars. +** This command is in preview and under development. **`, RunE: func(cmd *cobra.Command, args []string) error { return o.RunDriverPrintenv(ctx) },