cleanup(userspac/falco): drop deprecated options.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro 2024-10-01 12:16:57 +02:00 committed by poiana
parent 6997c96306
commit 41f20fd07a
3 changed files with 2 additions and 33 deletions

View File

@ -68,24 +68,11 @@ static void init_syscall_inspector(falco::app::state& s, std::shared_ptr<sinsp>
}
}
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
//

View File

@ -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[]=<socket_path> 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[]=<socket_path> instead. Path to CRI socket for container metadata. Use the specified <path> 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), "<path>")
("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 <event_source>. 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), "<event_source>")
("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 <event_source>. 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), "<event_source>")

View File

@ -47,8 +47,6 @@ public:
std::string conf_filename;
bool all_events = false;
sinsp_evt::param_fmt event_buffer_format = sinsp_evt::PF_NORMAL;
std::vector<std::string> cri_socket_paths;
bool disable_cri_async = false;
std::vector<std::string> disable_sources;
std::vector<std::string> enable_sources;
std::string gvisor_generate_config_with_socket;