-
Notifications
You must be signed in to change notification settings - Fork 908
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
Conversation
Signed-off-by: Federico Di Pierro <[email protected]>
scripts/falcoctl/falcoctl.yaml.in
Outdated
@@ -1,5 +1,8 @@ | |||
driver: | |||
type: "kmod" | |||
type: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leverage new falcoctl feature to automatically select the best driver for us.
…n cmake configuration. Signed-off-by: Federico Di Pierro <[email protected]>
@@ -1,5 +1,5 @@ | |||
driver: | |||
type: "kmod" | |||
type: [@FALCOCTL_DRIVER_TYPES@] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…eal with new automatic driver selection as default behavior. Signed-off-by: Federico Di Pierro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
This is still wip :D |
Signed-off-by: Federico Di Pierro <[email protected]>
…s entrypoints. Signed-off-by: Federico Di Pierro <[email protected]>
;; | ||
esac | ||
if [ -n "$CHOICE" ]; then | ||
if [ -n "$chosen_driver" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to check whether any driver was actually chosen (ie: if neither FALCO_DRIVER_CHOICE=none
was passd nor Manual configuration
was set).
@@ -17,7 +17,8 @@ | |||
# limitations under the License. | |||
# | |||
|
|||
chosen_driver= | |||
# By default, we use the automatic selection for drivers | |||
chosen_driver="auto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New default is automatic selection.
if [ "$chosen_driver" = "auto" ]; then | ||
# Configure falcoctl to enable all drivers | ||
falcoctl driver config --type "modern_ebpf" --type "ebpf" --type "kmod" | ||
# Load the actually automatic chosen driver | ||
chosen_driver=$(falcoctl driver printenv | grep DRIVER= | cut -d'"' -f2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For automatic driver selection, configure falcoctl with all drivers; then use printenv
to load the runtime selected driver; it is needed to know which systemd unit must be enabled.
scripts/rpm/postinstall.in
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has same changes as the deb one.
@@ -24,8 +24,10 @@ print_usage() { | |||
echo " docker run -i -t --privileged -v /root/.falco:/root/.falco -v /proc:/host/proc:ro -v /boot:/host/boot:ro -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro -v /etc:/host/etc:ro falcosecurity/falco-driver-loader-legacy:latest [driver] [options]" | |||
echo "" | |||
echo "Available drivers:" | |||
echo " kmod kernel module (default)" | |||
echo " auto leverage automatic driver selection logic (default)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like for rpm/deb, automatic selection is the default.
In this case, there is no need to explicitly call
/usr/bin/falcoctl driver config --type modern_ebpf --type ebpf --type kmod
since that is already the default falcoctl config shipped within Falco (see https://github.com/falcosecurity/falco/pull/3154/files#diff-8cef78de718faa0811f718db1971271a3a7172a72b015e10bc59dc8077c5d4e2).
For dep and rpm, we always call it to eventually reset the falcoctl configuration upon package upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM!
@@ -322,7 +322,7 @@ rules_file: | |||
# buffers (higher `cpus_for_each_buffer`) can lower the memory footprint. | |||
# | |||
engine: | |||
kind: kmod | |||
kind: modern_ebpf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -1,5 +1,5 @@ | |||
driver: | |||
type: "kmod" | |||
type: [@FALCOCTL_DRIVER_TYPES@] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Federico Di Pierro <[email protected]>
Refs #3165 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind release
Any specific area of the project related to this PR?
/area build
What this PR does / why we need it:
This PR bumps falcoctl to v0.8.0-rc1.
Moreover, it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
TODO:
Does this PR introduce a user-facing change?: