-
Notifications
You must be signed in to change notification settings - Fork 905
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
new: falcoctl driver loader #2905
Conversation
cmake/modules/falcoctl.cmake
Outdated
@@ -28,8 +28,9 @@ endif() | |||
|
|||
ExternalProject_Add( | |||
falcoctl | |||
URL "https://github.com/falcosecurity/falcoctl/releases/download/v${FALCOCTL_VERSION}/falcoctl_${FALCOCTL_VERSION}_${FALCOCTL_SYSTEM_NAME}_${FALCOCTL_SYSTEM_PROC_GO}.tar.gz" | |||
URL_HASH "SHA256=${FALCOCTL_HASH}" | |||
URL "https://github.com/falcosecurity/falcoctl/archive/555594a2860284947ff83eefd4bd9a5abc6e9fe1.zip" |
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.
Download zip from my own falcoctl PR.
@@ -26,4 +26,5 @@ do | |||
ln -s "$i" "/usr/src/$base" | |||
done | |||
|
|||
/usr/bin/falco-driver-loader "$@" | |||
/usr/bin/falcoctl driver config "$@" |
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 will need some more work, i am not sure what we want to do.
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.
Same goes for other occurrences.
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 will need some more work, i am not sure what we want to do.
What do you mean? what do we miss here?
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.
Oh the parameters being passed to falco-driver-loader were surely different from the one being passed to falcoctl driver
; also config
might be wrong there, since we may want to let users decide which subcmd to invoke.
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.
We decided to reimplement a similar switch logic to the one supported by falco-driver-loader (https://github.com/falcosecurity/falco/blob/master/scripts/falco-driver-loader#L752) managing each flag.
scripts/debian/postinst.in
Outdated
# If needed, try to load/compile the driver through falco-driver-loader | ||
# If needed, try to load/compile the driver through falcoctl | ||
echo "[POST-INSTALL] Configure falcoctl driver type:" | ||
falcoctl driver config --type $chosen_driver |
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.
We now configure the desired driver type, and then build/download the driver using falcoctl.
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.
falcoctl config file must now be configured properly.
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.
Nice!
Just did a first look and left a few comments.
Note: once #2413 gets merged, this should be at least ready for local testing with the CI produced packages. |
build-packages is failing with:
that is because our falcoctl.cmake file expects falcoctl releases (and is not able to build falcoctl from sources since it would add the huge dep on |
TODO:
|
96a4b38
to
d2ebe43
Compare
Done. |
We just need an alpha tag of falcoctl 0.7.0 to be tested within this PR. |
falcosecurity/testing#34 + falcosecurity/testing#33 should allow |
c294151
to
05dd35a
Compare
The only failing test left is
that will be fixed by falcosecurity/testing#34 |
05dd35a
to
5a919ff
Compare
…coctl driver` command. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
5a919ff
to
d3422d6
Compare
cmake/modules/falcoctl.cmake
Outdated
@@ -16,14 +16,14 @@ include(ExternalProject) | |||
|
|||
string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} FALCOCTL_SYSTEM_NAME) | |||
|
|||
set(FALCOCTL_VERSION "0.6.2") | |||
set(FALCOCTL_VERSION "0.7.0-alpha2") |
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.
Will need to bump to beta1
once it is out.
d3422d6
to
c071285
Compare
…onfig key. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…nd `FALCOCTL_ENABLED` . Also, env variables always have precedence over dialog (ie: if they are set, we always skip dialog). Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
c071285
to
678ca39
Compare
CHOICE=4 | ||
;; | ||
esac | ||
if [ -z $CHOICE ] && [ -x /usr/bin/dialog ] && [ "${FALCO_FRONTEND}" != "noninteractive" ]; 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.
Env var has always precedence.
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.
I think this needs to be documented cc @falcosecurity/falco-website-maintainers
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Bumped falcosecurity-testing to latest dev to (hopefully) fixup dev test-packages ci. |
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Ops, we need falcosecurity/testing#37 too ;) |
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Also need falcosecurity/falcoctl#369 because compiled eBPF probe is expected to be symlinked to |
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Tests are finally passing! 🚀 |
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 a couple of minor issues found (see comments below), which we can fix in a follow-up PR.
Thus, it's ok for me to merge this so we can start more accurate testing.
print_usage() { | ||
echo "" | ||
echo "Usage:" | ||
echo " falco-driver-loader [driver] [options]" |
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.
echo " falco-driver-loader [driver] [options]" | |
echo " falco-driver-loader [driver] [options]" |
This is misleading since there's no falco-driver-loader
executable anymore.
Still trying to figure out how to fix it. May we print the container image usage help message instead? 🤔
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.
You are right! Will fix in a follow up PR
print_usage() { | ||
echo "" | ||
echo "Usage:" | ||
echo " falco-driver-loader [driver] [options]" |
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.
Same as above
print_usage() { | ||
echo "" | ||
echo "Usage:" | ||
echo " falco-driver-loader [driver] [options]" |
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.
same as above
CHOICE=4 | ||
;; | ||
esac | ||
if [ -z $CHOICE ] && [ -x /usr/bin/dialog ] && [ "${FALCO_FRONTEND}" != "noninteractive" ]; 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.
I think this needs to be documented cc @falcosecurity/falco-website-maintainers
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 feature
Any specific area of the project related to this PR?
/area build
What this PR does / why we need it:
This PR drops old falco-driver-loader script in favor of new
falcoctl driver
command.Which issue(s) this PR fixes:
Fixes #2675
Special notes for your reviewer:
This is
wip
because falcoctl's PR (falcosecurity/falcoctl#343) is still to be merged and this will need some more work.I opened this one to give an idea of the final look.
Does this PR introduce a user-facing change?: