falcosecurity / charts

Community managed Helm charts for running Falco with Kubernetes
Apache License 2.0
245 stars 290 forks source link

fix(falco): correctly mount host filesystems when driver.kind is auto #738

Closed alacuku closed 2 months ago

alacuku commented 2 months ago

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

If this PR will release a new chart version please make sure to also uncomment the following line:

/kind chart-release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines: /area falco-chart

/area falco-exporter-chart

/area falcosidekick-chart

/area event-generator-chart

/area k8s-metacollector

What this PR does / why we need it:

When falco runs with kmod/module driver it needs special filesystems to be mounted from the host such /dev and /sys/module/falco. This commit ensures that we mount them in the falco container.

Note that, the /sys/module/falco is now mounted as /sys/module since we do not know which kind of driver will be used. The falco folder exists under /sys/module only when the kernel module is loaded, hence it's not possible to use the /sys/module/falco hostpath when driver.kind is set to auto.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Checklist

alacuku commented 2 months ago

/hold

alacuku commented 2 months ago

/unhold

poiana commented 2 months ago

LGTM label has been added.

Git tree hash: 29bf5e49718825d3b529910eeb9b74268e470b0d

poiana commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alacuku, Issif

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: - ~~[OWNERS](https://github.com/falcosecurity/charts/blob/master/OWNERS)~~ [Issif,alacuku] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment