Conversation
cmake/modules/falcoctl.cmake
Outdated
| 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.
Download zip from my own falcoctl PR.
| done | ||
|
|
||
| /usr/bin/falco-driver-loader "$@" | ||
| /usr/bin/falcoctl driver config "$@" |
There was a problem hiding this comment.
This will need some more work, i am not sure what we want to do.
There was a problem hiding this comment.
Same goes for other occurrences.
There was a problem hiding this comment.
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.
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.
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.
We now configure the desired driver type, and then build/download the driver using falcoctl.
There was a problem hiding this comment.
falcoctl config file must now be configured properly.
leogr
left a comment
There was a problem hiding this comment.
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>
cmake/modules/falcoctl.cmake
Outdated
| 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.
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.
Env var has always precedence.
There was a problem hiding this comment.
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! 🚀 |
leogr
left a comment
There was a problem hiding this comment.
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.
| 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.
You are right! Will fix in a follow up PR
| print_usage() { | ||
| echo "" | ||
| echo "Usage:" | ||
| echo " falco-driver-loader [driver] [options]" |
| print_usage() { | ||
| echo "" | ||
| echo "Usage:" | ||
| echo " falco-driver-loader [driver] [options]" |
| CHOICE=4 | ||
| ;; | ||
| esac | ||
| if [ -z $CHOICE ] && [ -x /usr/bin/dialog ] && [ "${FALCO_FRONTEND}" != "noninteractive" ]; then |
There was a problem hiding this comment.
I think this needs to be documented cc @falcosecurity/falco-website-maintainers
|
[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 DetailsNeeds 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 drivercommand.Which issue(s) this PR fixes:
Fixes #2675
Special notes for your reviewer:
This is
wipbecause 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?: