From 41f20fd07aacf19270236aaf98287d3c6b986cdb Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Tue, 1 Oct 2024 12:16:57 +0200 Subject: [PATCH] cleanup(userspac/falco): drop deprecated options. Signed-off-by: Federico Di Pierro --- userspace/falco/app/actions/init_inspectors.cpp | 17 ++--------------- userspace/falco/app/options.cpp | 16 ---------------- userspace/falco/app/options.h | 2 -- 3 files changed, 2 insertions(+), 33 deletions(-) diff --git a/userspace/falco/app/actions/init_inspectors.cpp b/userspace/falco/app/actions/init_inspectors.cpp index cf3e3849d6c..31cc80bb35d 100644 --- a/userspace/falco/app/actions/init_inspectors.cpp +++ b/userspace/falco/app/actions/init_inspectors.cpp @@ -68,24 +68,11 @@ static void init_syscall_inspector(falco::app::state& s, std::shared_ptr } } - bool disable_cri_async = - s.config->m_container_engines_disable_cri_async || s.options.disable_cri_async; - inspector->set_cri_async(!disable_cri_async); - - if(disable_cri_async) { + inspector->set_cri_async(!s.config->m_container_engines_disable_cri_async); + if(s.config->m_container_engines_disable_cri_async) { falco_logger::log(falco_logger::level::DEBUG, "Disabling async lookups for 'CRI'"); } - // Container engines configs via CLI args - // If required, set the CRI paths - for(auto& p : s.options.cri_socket_paths) { - if(!p.empty()) { - inspector->add_cri_socket_path(p); - falco_logger::log(falco_logger::level::DEBUG, - "Enabled container runtime socket at '" + p + "' via CLI args"); - } - } - // // If required, set the snaplen // diff --git a/userspace/falco/app/options.cpp b/userspace/falco/app/options.cpp index cf651ff27f9..5572bf34065 100644 --- a/userspace/falco/app/options.cpp +++ b/userspace/falco/app/options.cpp @@ -80,18 +80,6 @@ bool options::parse(int argc, char **argv, std::string &errstr) { } } - if(m_cmdline_parsed.count("cri") > 0) { - falco_logger::log(falco_logger::level::WARNING, - "The --cri option is deprecated and will be removed in Falco 0.40.0. Use " - "-o container_engines.cri.sockets[]= instead."); - } - - if(m_cmdline_parsed.count("disable-cri-async") > 0) { - falco_logger::log(falco_logger::level::WARNING, - "The --disable-cri-async option is deprecated and will be removed in " - "Falco 0.40.0. Use -o container_engines.cri.disable_async=true instead."); - } - list_fields = m_cmdline_parsed.count("list") > 0; return true; @@ -115,10 +103,6 @@ void options::define(cxxopts::Options& opts) ("rule-schema", "Print the rule json schema and exit.", cxxopts::value(print_rule_schema)->default_value("false")) ("A", "Monitor all events supported by Falco and defined in rules and configs. Some events are ignored by default when -A is not specified (the -i option lists these events ignored). Using -A can impact performance. This option has no effect when reproducing events from a capture file.", cxxopts::value(all_events)->default_value("false")) ("b,print-base64", "Print data buffers in base64. This is useful for encoding binary data that needs to be used over media designed to consume this format.") -#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD) - ("cri", "DEPRECATED: use -o container_engines.cri.sockets[]= instead. Path to CRI socket for container metadata. Use the specified to fetch data from a CRI-compatible runtime. If not specified, built-in defaults for commonly known paths are used. This option can be passed multiple times to specify a list of sockets to be tried until a successful one is found.", cxxopts::value(cri_socket_paths), "") - ("disable-cri-async", "DEPRECATED: use -o container_engines.cri.disable_async=true instead. Turn off asynchronous CRI metadata fetching. This is useful to let the input event wait for the container metadata fetch to finish before moving forward. Async fetching, in some environments leads to empty fields for container metadata when the fetch is not fast enough to be completed asynchronously. This can have a performance penalty on your environment depending on the number of containers and the frequency at which they are created/started/stopped.", cxxopts::value(disable_cri_async)->default_value("false")) -#endif ("disable-source", "Turn off a specific . By default, all loaded sources get enabled. Available sources are 'syscall' plus all sources defined by loaded plugins supporting the event sourcing capability. This option can be passed multiple times, but turning off all event sources simultaneously is not permitted. This option can not be mixed with --enable-source. This option has no effect when reproducing events from a capture file.", cxxopts::value(disable_sources), "") ("dry-run", "Run Falco without processing events. It can help check that the configuration and rules do not have any errors.", cxxopts::value(dry_run)->default_value("false")) ("enable-source", "Enable a specific . By default, all loaded sources get enabled. Available sources are 'syscall' plus all sources defined by loaded plugins supporting the event sourcing capability. This option can be passed multiple times. When using this option, only the event sources specified by it will be enabled. This option can not be mixed with --disable-source. This option has no effect when reproducing events from a capture file.", cxxopts::value(enable_sources), "") diff --git a/userspace/falco/app/options.h b/userspace/falco/app/options.h index da35d76ed74..76d73d998e8 100644 --- a/userspace/falco/app/options.h +++ b/userspace/falco/app/options.h @@ -47,8 +47,6 @@ class options { std::string conf_filename; bool all_events = false; sinsp_evt::param_fmt event_buffer_format = sinsp_evt::PF_NORMAL; - std::vector cri_socket_paths; - bool disable_cri_async = false; std::vector disable_sources; std::vector enable_sources; std::string gvisor_generate_config_with_socket;