Skip to content

Commit

Permalink
chore(agent,sysdig-deploy): mount /host/dev volume readonly on ebpf m…
Browse files Browse the repository at this point in the history
…ode (#1901)
  • Loading branch information
francesco-furlan authored Sep 4, 2024
1 parent e76bff1 commit 5b43c24
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ sources:
- https://app.sysdigcloud.com/#/settings/user
- https://github.com/draios/sysdig
type: application
version: 1.27.18
version: 1.28.0
1 change: 1 addition & 0 deletions charts/agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ spec:
{{- /* Always requested */}}
- mountPath: /host/dev
name: dev-vol
readOnly: {{ (include "agent.ebpfEnabled" .) | default false }}
- mountPath: /host/usr
name: usr-vol
readOnly: true
Expand Down
1 change: 1 addition & 0 deletions charts/agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ spec:
{{- /* Always requested */}}
- mountPath: /host/dev
name: dev-vol
readOnly: {{ (include "agent.ebpfEnabled" .) | default false }}
- mountPath: /host/proc
name: proc-vol
readOnly: true
Expand Down
30 changes: 30 additions & 0 deletions charts/agent/tests/volumes_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@ tests:
templates:
- daemonset.yaml

- it: Ensure /host/dev host volume is NOT mounted readonly by default
set:
sysdig:
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
delegatedAgentDeployment:
enabled: true
asserts:
- equal:
path: spec.template.spec.containers[*].volumeMounts[?(@.name == "dev-vol")].readOnly
value: false
templates:
- daemonset.yaml
- deployment.yaml

- it: Ensure /host/dev host volume is mounted readonly on epbf mode
set:
ebpf:
enabled: true
sysdig:
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
delegatedAgentDeployment:
enabled: true
asserts:
- equal:
path: spec.template.spec.containers[*].volumeMounts[?(@.name == "dev-vol")].readOnly
value: true
templates:
- daemonset.yaml
- deployment.yaml

- it: Ensure /var/data host volume is mounted as /host/var/data in container
set:
sysdig:
Expand Down
4 changes: 2 additions & 2 deletions charts/sysdig-deploy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sysdig-deploy
description: A chart with various Sysdig components for Kubernetes
type: application
version: 1.62.4
version: 1.63.0
maintainers:
- name: AlbertoBarba
email: [email protected]
Expand All @@ -26,7 +26,7 @@ dependencies:
- name: agent
# repository: https://charts.sysdig.com
repository: file://../agent
version: ~1.27.18
version: ~1.28.0
alias: agent
condition: agent.enabled
- name: common
Expand Down

0 comments on commit 5b43c24

Please sign in to comment.