diff --git a/cmd/cli_test.go b/cmd/cli_test.go index 7064a200..949b78d3 100644 --- a/cmd/cli_test.go +++ b/cmd/cli_test.go @@ -19,7 +19,6 @@ package cmd import ( "bytes" - "io/ioutil" "os" "path/filepath" "runtime" @@ -131,6 +130,8 @@ var tests = []testCase{ "ubuntu-aws", "--output-module", "/tmp/falco-ubuntu-aws.ko", + "--output-probe", + "/tmp/falco-ubuntu-aws.o", "--loglevel", "debug", }, @@ -143,6 +144,7 @@ var tests = []testCase{ env: map[string]string{ "DRIVERKIT_KERNELVERSION": "59", "DRIVERKIT_OUTPUT_MODULE": "/tmp/falco-ubuntu-aws.ko", + "DRIVERKIT_OUTPUT_PROBE": "/tmp/falco-ubuntu-aws.o", }, args: []string{ "docker", @@ -321,6 +323,7 @@ func run(t *testing.T, test testCase) { var buf bytes.Buffer configOpts.setOutput(&buf, true) c := NewRootCmd(configOpts, rootOpts) + c.SetOutput(&buf) if len(test.args) == 0 || (test.args[0] != "__complete" && test.args[0] != "__completeNoDesc" && test.args[0] != "help" && test.args[0] != "completion") { test.args = append(test.args, "--dryrun") } @@ -338,6 +341,8 @@ func run(t *testing.T, test testCase) { } else { assert.Error(t, err, test.expect.err) } + // Exactly same behavior as rootCmd.Start(), but here we use ERROR instead of FATAL to avoid leaving + configOpts.Printer.Logger.Error("error executing driverkit", configOpts.Printer.Logger.Args("err", err.Error())) } out := buf.String() res := stripansi.Strip(out) @@ -365,7 +370,7 @@ type testTemplateData struct { } func readTemplateFile(t *testing.T, s string) string { - out, err := ioutil.ReadFile("testdata/templates/" + s) + out, err := os.ReadFile("testdata/templates/" + s) assert.NilError(t, err) return string(out) } diff --git a/cmd/config_options.go b/cmd/config_options.go index 5a2237f1..220931d2 100644 --- a/cmd/config_options.go +++ b/cmd/config_options.go @@ -51,10 +51,16 @@ type ConfigOptions struct { } func (co *ConfigOptions) initPrinter() { + // DisableStyling is only enforced by tests. if co.disableStyling { - pterm.DisableColor() + pterm.DisableStyling() } co.Printer = output.NewPrinter(co.logLevel.ToPtermLogLevel(), pterm.LogFormatterColorful, co.writer) + if co.disableStyling { + // Disable time print for tests + co.Printer.Logger = co.Printer.Logger.WithTime(false) + } + } // Called by tests to disable styling and set bytes buffer as output @@ -97,7 +103,7 @@ func (co *ConfigOptions) validate() []error { // AddFlags registers the common flags. func (co *ConfigOptions) AddFlags(flags *pflag.FlagSet) { flags.StringVarP(&co.configFile, "config", "c", co.configFile, "config file path (default $HOME/.driverkit.yaml if exists)") - flags.VarP(co.logLevel, "loglevel", "l", "Set level for logs "+co.logLevel.Allowed()) + flags.VarP(co.logLevel, "loglevel", "l", "set level for logs "+co.logLevel.Allowed()) flags.IntVar(&co.Timeout, "timeout", co.Timeout, "timeout in seconds") flags.StringVar(&co.ProxyURL, "proxy", co.ProxyURL, "the proxy to use to download data") flags.BoolVar(&co.dryRun, "dryrun", co.dryRun, "do not actually perform the action") @@ -133,7 +139,11 @@ func (co *ConfigOptions) Init() bool { viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) // If a config file is found, read it in. - if err := viper.ReadInConfig(); err == nil { + err := viper.ReadInConfig() + // Init printer with either read or existent one, + // so that we can further log considering log level set. + co.initPrinter() + if err == nil { co.Printer.Logger.Info("using config file", co.Printer.Logger.Args("file", viper.ConfigFileUsed())) } else { @@ -143,6 +153,5 @@ func (co *ConfigOptions) Init() bool { co.Printer.Logger.Debug("running without a configuration file") } } - co.initPrinter() return configErr } diff --git a/cmd/root.go b/cmd/root.go index 717f9c10..6348575a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -15,7 +15,9 @@ limitations under the License. package cmd import ( + "errors" "fmt" + "io" "os" "sort" "strings" @@ -31,10 +33,11 @@ import ( func persistentValidateFunc(rootCommand *RootCmd, configOpts *ConfigOptions, rootOpts *RootOptions) func(c *cobra.Command, args []string) error { return func(c *cobra.Command, args []string) error { + var validationError = errors.New("exiting for validation errors") configErr := configOpts.Init() // Early exit if detect some error into config flags if configErr { - return fmt.Errorf("exiting for validation errors") + return validationError } // Merge environment variables or config file values into the RootOptions instance skip := map[string]bool{ // do not merge these @@ -89,7 +92,7 @@ func persistentValidateFunc(rootCommand *RootCmd, configOpts *ConfigOptions, roo configOpts.Printer.Logger.Error("error validating build options", configOpts.Printer.Logger.Args("err", err.Error())) } - return fmt.Errorf("exiting for validation errors") + return validationError } rootOpts.Log(configOpts.Printer) } @@ -112,6 +115,7 @@ func NewRootCmd(configOpts *ConfigOptions, rootOpts *RootOptions) *RootCmd { Args: cobra.OnlyValidArgs, DisableFlagsInUseLine: true, DisableAutoGenTag: true, + SilenceErrors: true, SilenceUsage: true, Version: version.String(), RunE: func(c *cobra.Command, args []string) error { @@ -189,6 +193,12 @@ func (r *RootCmd) SetArgs(args []string) { r.c.SetArgs(args) } +// SetOutput sets the main command output writer. +func (r *RootCmd) SetOutput(w io.Writer) { + r.c.SetOut(w) + r.c.SetErr(w) +} + // Execute proxies the cobra.Command execution. func (r *RootCmd) Execute() error { return r.c.Execute() diff --git a/cmd/testdata/autohelp.txt b/cmd/testdata/autohelp.txt index b293deb7..8e789323 100644 --- a/cmd/testdata/autohelp.txt +++ b/cmd/testdata/autohelp.txt @@ -1,4 +1,5 @@ -level=INFO msg="specify a valid processor" processors="[docker kubernetes kubernetes-in-cluster local]" +INFO specify a valid processor + └ processors: [docker kubernetes kubernetes-in-cluster local] {{ .Desc }} {{ .Usage }} diff --git a/cmd/testdata/configs/1.yaml b/cmd/testdata/configs/1.yaml index 98cd8d76..0f2d41e0 100644 --- a/cmd/testdata/configs/1.yaml +++ b/cmd/testdata/configs/1.yaml @@ -3,4 +3,5 @@ kernelversion: 59 target: ubuntu-aws output: module: /tmp/falco-ubuntu-aws.ko + probe: /tmp/falco-ubuntu-aws.o driverversion: master diff --git a/cmd/testdata/configs/2.yaml b/cmd/testdata/configs/2.yaml index 9260a15a..ca6d01fc 100644 --- a/cmd/testdata/configs/2.yaml +++ b/cmd/testdata/configs/2.yaml @@ -7,4 +7,5 @@ kernelurls: [ target: ubuntu-aws output: module: /tmp/falco-ubuntu-aws.ko + probe: /tmp/falco-ubuntu-aws.o driverversion: master diff --git a/cmd/testdata/docker-from-config-debug.txt b/cmd/testdata/docker-from-config-debug.txt index 99544a34..057c1bcd 100644 --- a/cmd/testdata/docker-from-config-debug.txt +++ b/cmd/testdata/docker-from-config-debug.txt @@ -1,3 +1,13 @@ -level=INFO msg="using config file" file=testdata/configs/1.yaml -level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-aws.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=59 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls=[] repo-org=falcosecurity repo-name=libs -level=INFO msg="driver building, it will take a few seconds" processor=docker +INFO using config file file: testdata/configs/1.yaml +DEBUG running with options + ├ output-module: /tmp/falco-ubuntu-aws.ko + ├ output-probe: /tmp/falco-ubuntu-aws.o + ├ driverversion: master + ├ kernelrelease: 4.15.0-1057-aws + ├ kernelversion: 59 + ├ target: ubuntu-aws + ├ arch: amd64 + ├ kernelurls: [] + ├ repo-org: falcosecurity + └ repo-name: libs +INFO starting build processor: docker diff --git a/cmd/testdata/docker-override-from-config-debug.txt b/cmd/testdata/docker-override-from-config-debug.txt index dcce457b..751f6a11 100644 --- a/cmd/testdata/docker-override-from-config-debug.txt +++ b/cmd/testdata/docker-override-from-config-debug.txt @@ -1,3 +1,13 @@ -level=INFO msg="using config file" file=testdata/configs/1.yaml -level=DEBUG msg="running with options" output-module=/tmp/override.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=229 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls=[] repo-org=falcosecurity repo-name=libs -level=INFO msg="driver building, it will take a few seconds" processor=docker +INFO using config file file: testdata/configs/1.yaml +DEBUG running with options + ├ output-module: /tmp/override.ko + ├ output-probe: /tmp/falco-ubuntu-aws.o + ├ driverversion: master + ├ kernelrelease: 4.15.0-1057-aws + ├ kernelversion: 229 + ├ target: ubuntu-aws + ├ arch: amd64 + ├ kernelurls: [] + ├ repo-org: falcosecurity + └ repo-name: libs +INFO starting build processor: docker diff --git a/cmd/testdata/docker-override-urls-from-config-debug.txt b/cmd/testdata/docker-override-urls-from-config-debug.txt index 39dbee47..a3115db8 100644 --- a/cmd/testdata/docker-override-urls-from-config-debug.txt +++ b/cmd/testdata/docker-override-urls-from-config-debug.txt @@ -1,3 +1,13 @@ -level=INFO msg="using config file" file=testdata/configs/2.yaml -level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-aws.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=59 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls="[https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb]" repo-org=falcosecurity repo-name=libs -level=INFO msg="driver building, it will take a few seconds" processor=docker +INFO using config file file: testdata/configs/2.yaml +DEBUG running with options + ├ output-module: /tmp/falco-ubuntu-aws.ko + ├ output-probe: /tmp/falco-ubuntu-aws.o + ├ driverversion: master + ├ kernelrelease: 4.15.0-1057-aws + ├ kernelversion: 59 + ├ target: ubuntu-aws + ├ arch: amd64 + ├ kernelurls: [https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb] + ├ repo-org: falcosecurity + └ repo-name: libs +INFO starting build processor: docker diff --git a/cmd/testdata/docker-related-target-debug.txt b/cmd/testdata/docker-related-target-debug.txt index 56ca2299..029d5d29 100644 --- a/cmd/testdata/docker-related-target-debug.txt +++ b/cmd/testdata/docker-related-target-debug.txt @@ -1,3 +1,13 @@ -level=DEBUG msg="running without a configuration file" -level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-azure.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-azure kernelversion=62 target=ubuntu-azure arch={{ .CurrentArch }} kernelurls="[http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-azure-headers-4.15.0-1057_4.15.0-1057.62_all.deb http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-headers-4.15.0-1057-azure_4.15.0-1057.62_amd64.deb]" repo-org=falcosecurity repo-name=libs -level=INFO msg="driver building, it will take a few seconds" processor=docker +DEBUG running without a configuration file +DEBUG running with options + ├ output-module: /tmp/falco-ubuntu-azure.ko + ├ output-probe: /tmp/falco-ubuntu-aws.o + ├ driverversion: master + ├ kernelrelease: 4.15.0-1057-azure + ├ kernelversion: 62 + ├ target: ubuntu-azure + ├ arch: amd64 + ├ kernelurls: [http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-azure-headers-4.15.0-1057_4.15.0-1057.62_all.deb http://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-azure/linux-headers-4.15.0-1057-azure_4.15.0-1057.62_amd64.deb] + ├ repo-org: falcosecurity + └ repo-name: libs +INFO starting build processor: docker diff --git a/cmd/testdata/docker-target-redhat-validation-error-debug.txt b/cmd/testdata/docker-target-redhat-validation-error-debug.txt index 1fe781ef..821eab1f 100644 --- a/cmd/testdata/docker-target-redhat-validation-error-debug.txt +++ b/cmd/testdata/docker-target-redhat-validation-error-debug.txt @@ -1,8 +1,4 @@ -level=DEBUG msg="running without a configuration file" -level=ERROR msg="error validating build options" err="builder image is a required field when target is redhat" -Error: exiting for validation errors -Usage: - driverkit docker [flags] - -{{ .Flags }} - +DEBUG running without a configuration file +ERROR error validating build options + └ err: builder image is a required field when target is redhat +ERROR error executing driverkit err: exiting for validation errors diff --git a/cmd/testdata/docker-with-flags-debug.txt b/cmd/testdata/docker-with-flags-debug.txt index ede541bc..cf513233 100644 --- a/cmd/testdata/docker-with-flags-debug.txt +++ b/cmd/testdata/docker-with-flags-debug.txt @@ -1,3 +1,13 @@ -level=DEBUG msg="running without a configuration file" -level=DEBUG msg="running with options" output-module=/tmp/falco-ubuntu-aws.ko output-probe="" driverversion=master kernelrelease=4.15.0-1057-aws kernelversion=59 target=ubuntu-aws arch={{ .CurrentArch }} kernelurls="[https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb]" repo-org=falcosecurity repo-name=libs -level=INFO msg="driver building, it will take a few seconds" processor=docker +DEBUG running without a configuration file +DEBUG running with options + ├ output-module: /tmp/falco-ubuntu-aws.ko + ├ output-probe: /tmp/falco-ubuntu-aws.o + ├ driverversion: master + ├ kernelrelease: 4.15.0-1057-aws + ├ kernelversion: 59 + ├ target: ubuntu-aws + ├ arch: amd64 + ├ kernelurls: [https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-aws-headers-4.15.0-1057_4.15.0-1057.59_all.deb https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux-aws/linux-headers-4.15.0-1057-aws_4.15.0-1057.59_amd64.deb] + ├ repo-org: falcosecurity + └ repo-name: libs +INFO starting build processor: docker diff --git a/cmd/testdata/docker-with-flags.txt b/cmd/testdata/docker-with-flags.txt index 3922ce6f..163b4d2c 100644 --- a/cmd/testdata/docker-with-flags.txt +++ b/cmd/testdata/docker-with-flags.txt @@ -1 +1 @@ -level=INFO msg="driver building, it will take a few seconds" processor=docker +INFO starting build processor: docker diff --git a/cmd/testdata/dockernoopts.txt b/cmd/testdata/dockernoopts.txt index 942e7cbb..763f754f 100644 --- a/cmd/testdata/dockernoopts.txt +++ b/cmd/testdata/dockernoopts.txt @@ -1,10 +1,7 @@ -level=ERROR msg="error validating build options" err="kernel release is a required field" -level=ERROR msg="error validating build options" err="target is a required field" -level=ERROR msg="error validating build options" err="output module path is required when probe is missing" -level=ERROR msg="error validating build options" err="output probe path is required when module is missing" -Error: exiting for validation errors -Usage: - driverkit docker [flags] - -{{ .Flags }} - +ERROR error validating build options err: kernel release is a required field +ERROR error validating build options err: target is a required field +ERROR error validating build options + └ err: output module path is required when probe is missing +ERROR error validating build options + └ err: output probe path is required when module is missing +ERROR error executing driverkit err: exiting for validation errors diff --git a/cmd/testdata/invalid-proxyconfig.txt b/cmd/testdata/invalid-proxyconfig.txt index e5df89df..8e7393ca 100644 --- a/cmd/testdata/invalid-proxyconfig.txt +++ b/cmd/testdata/invalid-proxyconfig.txt @@ -1,11 +1,3 @@ -level=ERROR msg="error validating config options" err="proxy url must start with http:// or https:// or socks5:// prefix" -Error: exiting for validation errors -{{ .Usage }} - -{{ .Commands }} - -{{ .Flags }} - -v, --version version for driverkit - -{{ .Info }} - +ERROR error validating config options + └ err: proxy url must start with http:// or https:// or socks5:// prefix +ERROR error executing driverkit err: exiting for validation errors diff --git a/cmd/testdata/non-existent-processor.txt b/cmd/testdata/non-existent-processor.txt index 2a983321..8de2681a 100644 --- a/cmd/testdata/non-existent-processor.txt +++ b/cmd/testdata/non-existent-processor.txt @@ -1,10 +1 @@ -Error: invalid argument "abc" for "driverkit" -{{ .Usage }} - -{{ .Commands }} - -{{ .Flags }} - -v, --version version for driverkit - -{{ .Info }} - +ERROR error executing driverkit err: invalid argument "abc" for "driverkit" diff --git a/cmd/testdata/templates/flags.txt b/cmd/testdata/templates/flags.txt index fde8aa7b..2129531c 100644 --- a/cmd/testdata/templates/flags.txt +++ b/cmd/testdata/templates/flags.txt @@ -11,7 +11,7 @@ Flags: --kernelrelease string kernel release to build the module for, it can be found by executing 'uname -v' --kernelurls strings list of kernel header urls (e.g. --kernelurls --kernelurls --kernelurls ",") --kernelversion string kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default "1") - -l, --loglevel string log level (default "INFO") + -l, --loglevel string set level for logs (info, warn, debug, trace) (default "info") --moduledevicename string kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco") --moduledrivername string kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco") --output-module string filepath where to save the resulting kernel module diff --git a/docs/driverkit.md b/docs/driverkit.md index 5f8d02d1..9611c354 100644 --- a/docs/driverkit.md +++ b/docs/driverkit.md @@ -21,7 +21,7 @@ driverkit --kernelrelease string kernel release to build the module for, it can be found by executing 'uname -v' --kernelurls strings list of kernel header urls (e.g. --kernelurls --kernelurls --kernelurls ",") --kernelversion string kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default "1") - -l, --loglevel string Set level for logs (info, warn, debug, trace) (default "info") + -l, --loglevel string set level for logs (info, warn, debug, trace) (default "info") --moduledevicename string kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco") --moduledrivername string kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco") --output-module string filepath where to save the resulting kernel module diff --git a/docs/driverkit_docker.md b/docs/driverkit_docker.md index 44265719..f500e257 100644 --- a/docs/driverkit_docker.md +++ b/docs/driverkit_docker.md @@ -21,7 +21,7 @@ driverkit docker [flags] --kernelrelease string kernel release to build the module for, it can be found by executing 'uname -v' --kernelurls strings list of kernel header urls (e.g. --kernelurls --kernelurls --kernelurls ",") --kernelversion string kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default "1") - -l, --loglevel string Set level for logs (info, warn, debug, trace) (default "info") + -l, --loglevel string set level for logs (info, warn, debug, trace) (default "info") --moduledevicename string kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco") --moduledrivername string kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco") --output-module string filepath where to save the resulting kernel module diff --git a/docs/driverkit_images.md b/docs/driverkit_images.md index dd33663d..541de565 100644 --- a/docs/driverkit_images.md +++ b/docs/driverkit_images.md @@ -21,7 +21,7 @@ driverkit images [flags] --kernelrelease string kernel release to build the module for, it can be found by executing 'uname -v' --kernelurls strings list of kernel header urls (e.g. --kernelurls --kernelurls --kernelurls ",") --kernelversion string kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default "1") - -l, --loglevel string Set level for logs (info, warn, debug, trace) (default "info") + -l, --loglevel string set level for logs (info, warn, debug, trace) (default "info") --moduledevicename string kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco") --moduledrivername string kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco") --output-module string filepath where to save the resulting kernel module diff --git a/docs/driverkit_kubernetes-in-cluster.md b/docs/driverkit_kubernetes-in-cluster.md index b756aec8..5a95597a 100644 --- a/docs/driverkit_kubernetes-in-cluster.md +++ b/docs/driverkit_kubernetes-in-cluster.md @@ -22,7 +22,7 @@ driverkit kubernetes-in-cluster [flags] --kernelrelease string kernel release to build the module for, it can be found by executing 'uname -v' --kernelurls strings list of kernel header urls (e.g. --kernelurls --kernelurls --kernelurls ",") --kernelversion string kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default "1") - -l, --loglevel string Set level for logs (info, warn, debug, trace) (default "info") + -l, --loglevel string set level for logs (info, warn, debug, trace) (default "info") --moduledevicename string kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco") --moduledrivername string kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco") -n, --namespace string If present, the namespace scope for the pods and its config (default "default") diff --git a/docs/driverkit_kubernetes.md b/docs/driverkit_kubernetes.md index edb294db..5cb28798 100644 --- a/docs/driverkit_kubernetes.md +++ b/docs/driverkit_kubernetes.md @@ -34,7 +34,7 @@ driverkit kubernetes [flags] --kernelurls strings list of kernel header urls (e.g. --kernelurls --kernelurls --kernelurls ",") --kernelversion string kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default "1") --kubeconfig string path to the kubeconfig file to use for CLI requests - -l, --loglevel string Set level for logs (info, warn, debug, trace) (default "info") + -l, --loglevel string set level for logs (info, warn, debug, trace) (default "info") --moduledevicename string kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco") --moduledrivername string kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco") -n, --namespace string If present, the namespace scope for the pods and its config (default "default") diff --git a/docs/driverkit_local.md b/docs/driverkit_local.md index 56caf140..d7a1bf10 100644 --- a/docs/driverkit_local.md +++ b/docs/driverkit_local.md @@ -18,7 +18,7 @@ driverkit local [flags] -h, --help help for local --kernelrelease string kernel release to build the module for, it can be found by executing 'uname -v' --kernelversion string kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default "1") - -l, --loglevel string Set level for logs (info, warn, debug, trace) (default "info") + -l, --loglevel string set level for logs (info, warn, debug, trace) (default "info") --moduledevicename string kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco") --moduledrivername string kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco") --output-module string filepath where to save the resulting kernel module