mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-31 22:16:49 +00:00
fix(falco): allow disable_cri_async from both CLI and config
Signed-off-by: Luca Guerra <luca@guerra.sh>
This commit is contained in:
parent
262aa9a003
commit
683df327ac
@ -67,7 +67,14 @@ static void init_syscall_inspector(falco::app::state& s, std::shared_ptr<sinsp>
|
||||
"Enabled container runtime socket at '" + p + "' via config file");
|
||||
}
|
||||
}
|
||||
inspector->set_cri_async(!s.config->m_container_engines_disable_cri_async);
|
||||
|
||||
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) {
|
||||
falco_logger::log(falco_logger::level::DEBUG, "Disabling async lookups for 'CRI'");
|
||||
}
|
||||
|
||||
// Container engines configs via CLI args
|
||||
// If required, set the CRI paths
|
||||
@ -79,13 +86,6 @@ static void init_syscall_inspector(falco::app::state& s, std::shared_ptr<sinsp>
|
||||
}
|
||||
}
|
||||
|
||||
// Decide whether to do sync or async for CRI metadata fetch
|
||||
inspector->set_cri_async(!s.options.disable_cri_async);
|
||||
|
||||
if(s.options.disable_cri_async || s.config->m_container_engines_disable_cri_async) {
|
||||
falco_logger::log(falco_logger::level::DEBUG, "Disabling async lookups for 'CRI'");
|
||||
}
|
||||
|
||||
//
|
||||
// If required, set the snaplen
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user