Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(falco): allow disable_cri_async from both CLI and config #3353

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions userspace/falco/app/actions/init_inspectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
//
Expand Down
Loading