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

update(cmake,scripts): bumped falcoctl to v0.8.0-rc1 and set modern eBPF as default driver + enable automatic driver selection logic #3154

Merged
merged 6 commits into from
Apr 15, 2024
Merged
6 changes: 3 additions & 3 deletions cmake/modules/falcoctl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ include(ExternalProject)

string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} FALCOCTL_SYSTEM_NAME)

set(FALCOCTL_VERSION "0.7.2")
set(FALCOCTL_VERSION "0.8.0-rc1")

if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(FALCOCTL_SYSTEM_PROC_GO "amd64")
set(FALCOCTL_HASH "abbbef2beefceb3d518a638fbad220ca6002840d33a20a7f1de9b358c4dbef45")
set(FALCOCTL_HASH "120a45be26be26ed9795926e3d382440ce010b8ec31fda8a0118ec3d42fc7bc7")
else() # aarch64
set(FALCOCTL_SYSTEM_PROC_GO "arm64")
set(FALCOCTL_HASH "8dafef99948355febfa311bb940f8c714af631a249f4ae05ffd7d4c5f181e2c4")
set(FALCOCTL_HASH "f2c15e7a4c210ee9e3a521f4b6f6ed3096db6bf52426d369a9fe2a1cd3a4a4c2")
endif()

ExternalProject_Add(
Expand Down
11 changes: 11 additions & 0 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,18 @@ endif()
if (NOT WIN32 AND NOT APPLE AND NOT EMSCRIPTEN AND NOT MUSL_OPTIMIZED_BUILD)
if(NOT DEFINED FALCOCTL_ETC_DIR)
set(FALCOCTL_ETC_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/falcoctl")
endif()
set(FALCOCTL_DRIVER_TYPES_LIST "")
if (BUILD_FALCO_MODERN_BPF)
list(APPEND FALCOCTL_DRIVER_TYPES_LIST "modern_ebpf")
endif()
if (BUILD_BPF)
list(APPEND FALCOCTL_DRIVER_TYPES_LIST "ebpf")
endif()
if (BUILD_DRIVER)
list(APPEND FALCOCTL_DRIVER_TYPES_LIST "kmod")
endif()
string(REPLACE ";" ", " FALCOCTL_DRIVER_TYPES "${FALCOCTL_DRIVER_TYPES_LIST}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/falcoctl/falcoctl.yaml.in ${PROJECT_BINARY_DIR}/scripts/falcoctl/falcoctl.yaml)
install(FILES ${PROJECT_BINARY_DIR}/scripts/falcoctl/falcoctl.yaml DESTINATION "${FALCOCTL_ETC_DIR}" COMPONENT "${FALCO_COMPONENT_NAME}")
endif()
2 changes: 1 addition & 1 deletion scripts/falcoctl/falcoctl.yaml.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
driver:
type: "kmod"
type: [@FALCOCTL_DRIVER_TYPES@]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of allowed types is dynamically set, eg: if modern bpf is not built, it won't be present.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name: "@DRIVER_NAME@"
repos:
- "@DRIVERS_REPO@"
Expand Down
Loading