Skip to content

Commit

Permalink
fix(falco): correctly mount host filesystems when driver.kind is auto
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Aldo Lacuku <[email protected]>
  • Loading branch information
alacuku authored and poiana committed Sep 11, 2024
1 parent 3d3ab26 commit 98897b0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions charts/falco/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
This file documents all notable changes to Falco Helm Chart. The release
numbering uses [semantic versioning](http://semver.org).

## v4.8.2

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

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.

## v4.8.1

* fix(falcosidekick): add support for custom service type for webui redis
Expand Down
2 changes: 1 addition & 1 deletion charts/falco/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: falco
version: 4.8.1
version: 4.8.2
appVersion: "0.38.2"
description: Falco
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/falco/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ If you use a Proxy in your cluster, the requests between `Falco` and `Falcosidek

## Configuration

The following table lists the main configurable parameters of the falco chart v4.8.1 and their default values. See [values.yaml](./values.yaml) for full list.
The following table lists the main configurable parameters of the falco chart v4.8.2 and their default values. See [values.yaml](./values.yaml) for full list.

## Values

Expand Down
8 changes: 4 additions & 4 deletions charts/falco/templates/pod-template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ spec:
name: etc-fs
readOnly: true
{{- end -}}
{{- if and .Values.driver.enabled (or (eq .Values.driver.kind "kmod") (eq .Values.driver.kind "module")) }}
{{- if and .Values.driver.enabled (or (eq .Values.driver.kind "kmod") (eq .Values.driver.kind "module") (eq .Values.driver.kind "auto")) }}
- mountPath: /host/dev
name: dev-fs
readOnly: true
- name: sys-fs
mountPath: /sys/module/falco
mountPath: /sys/module
{{- end }}
{{- if and .Values.driver.enabled (and (eq .Values.driver.kind "ebpf") (contains "falco-no-driver" .Values.image.repository)) }}
- name: debugfs
Expand Down Expand Up @@ -249,13 +249,13 @@ spec:
hostPath:
path: /etc
{{- end }}
{{- if and .Values.driver.enabled (or (eq .Values.driver.kind "kmod") (eq .Values.driver.kind "module")) }}
{{- if and .Values.driver.enabled (or (eq .Values.driver.kind "kmod") (eq .Values.driver.kind "module") (eq .Values.driver.kind "auto")) }}
- name: dev-fs
hostPath:
path: /dev
- name: sys-fs
hostPath:
path: /sys/module/falco
path: /sys/module
{{- end }}
{{- if and .Values.driver.enabled (and (eq .Values.driver.kind "ebpf") (contains "falco-no-driver" .Values.image.repository)) }}
- name: debugfs
Expand Down

0 comments on commit 98897b0

Please sign in to comment.