Skip to content

Commit 3f0e1bc

Browse files
committed
cleanup(falco): deprecate -b --print-base64
Signed-off-by: Luca Guerra <[email protected]>
1 parent 69b3df1 commit 3f0e1bc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

userspace/falco/app/actions/init_inspectors.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ using namespace falco::app::actions;
2727

2828
static void init_syscall_inspector(falco::app::state& s, std::shared_ptr<sinsp> inspector) {
2929
sinsp_evt::param_fmt event_buffer_format = sinsp_evt::PF_NORMAL;
30-
if(s.options.print_base64 || s.config->m_buffer_format_base64) {
30+
if(s.options.print_base64) {
31+
falco_logger::log(falco_logger::level::WARNING,
32+
"The -b/--print-base64 option is deprecated and will be removed. Use -o "
33+
"buffer_format_base64=true instead.");
34+
event_buffer_format = sinsp_evt::PF_BASE64;
35+
}
36+
if(s.config->m_buffer_format_base64) {
3137
event_buffer_format = sinsp_evt::PF_BASE64;
3238
}
3339

userspace/falco/app/options.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void options::define(cxxopts::Options& opts)
114114
("config-schema", "Print the config json schema and exit.", cxxopts::value(print_config_schema)->default_value("false"))
115115
("rule-schema", "Print the rule json schema and exit.", cxxopts::value(print_rule_schema)->default_value("false"))
116116
("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"))
117-
("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.")
117+
("b,print-base64", "DEPRECATED: use -o buffer_format_base64=true. Print data buffers in base64. This is useful for encoding binary data that needs to be used over media designed to consume this format.")
118118
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
119119
("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>")
120120
("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"))

0 commit comments

Comments
 (0)