Skip to content

Commit

Permalink
fix(agent,sysdig-deploy): /var/data volume mount (#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-furlan authored Dec 15, 2023
1 parent 969ee27 commit d8e3852
Show file tree
Hide file tree
Showing 5 changed files with 40 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.18.2
version: 1.18.3
10 changes: 10 additions & 0 deletions charts/agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ spec:
readOnly: true
- mountPath: /host/var/lib
name: varlib-vol
- mountPath: /host/var/data
name: vardata-vol
- mountPath: /host/var/run
name: varrun-vol
{{- if (include "agent.ebpfEnabled" .) }}
Expand All @@ -300,6 +302,8 @@ spec:
readOnly: true
- mountPath: /host/var/lib
name: varlib-vol
- mountPath: /host/var/data
name: vardata-vol
- mountPath: /host/var/run
name: varrun-vol
{{- if (include "agent.ebpfEnabled" .) }}
Expand Down Expand Up @@ -425,6 +429,9 @@ spec:
- name: varlib-vol
hostPath:
path: /var/lib
- name: vardata-vol
hostPath:
path: /var/data
- name: varrun-vol
hostPath:
path: /var/run
Expand Down Expand Up @@ -460,6 +467,9 @@ spec:
- name: varlib-vol
hostPath:
path: /var/lib
- name: vardata-vol
hostPath:
path: /var/data
{{- if (include "agent.ebpfEnabled" .) }}
- name: bpf-probes
emptyDir: {}
Expand Down
10 changes: 10 additions & 0 deletions charts/agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ spec:
readOnly: true
- mountPath: /host/var/lib
name: varlib-vol
- mountPath: /host/var/data
name: vardata-vol
- mountPath: /host/run
name: run-vol
- mountPath: /host/var/run
Expand All @@ -180,6 +182,8 @@ spec:
readOnly: true
- mountPath: /host/var/lib
name: varlib-vol
- mountPath: /host/var/data
name: vardata-vol
- mountPath: /host/run
name: run-vol
- mountPath: /host/var/run
Expand Down Expand Up @@ -308,6 +312,9 @@ spec:
- name: varlib-vol
hostPath:
path: /var/lib
- name: vardata-vol
hostPath:
path: /var/data
- name: run-vol
hostPath:
path: /run
Expand All @@ -331,6 +338,9 @@ spec:
- name: varlib-vol
hostPath:
path: /var/lib
- name: vardata-vol
hostPath:
path: /var/data
- name: run-vol
hostPath:
path: /run
Expand Down
17 changes: 17 additions & 0 deletions charts/agent/tests/volumes_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@ tests:
templates:
- daemonset.yaml

- it: Ensure /var/data host volume is mounted as /host/var/data in container
set:
sysdig:
accessKey: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
delegatedAgentDeployment:
enabled: true
asserts:
- equal:
path: spec.template.spec.containers[*].volumeMounts[?(@.name == "vardata-vol")].mountPath
value: /host/var/data
- equal:
path: spec.template.spec.volumes[?(@.name == "vardata-vol")].hostPath.path
value: /var/data
templates:
- daemonset.yaml
- deployment.yaml

- it: Ensure /var/lib host volume is mounted as /host/var/lib in container
asserts:
- equal:
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.34.1
version: 1.34.2
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.18.2
version: ~1.18.3
alias: agent
condition: agent.enabled
- name: common
Expand Down

0 comments on commit d8e3852

Please sign in to comment.