From d8e38523b3e94f0a6311bb5be8f5135e56d47f1c Mon Sep 17 00:00:00 2001 From: Francesco Furlan Date: Fri, 15 Dec 2023 10:19:27 +0100 Subject: [PATCH] fix(agent,sysdig-deploy): /var/data volume mount (#1532) --- charts/agent/Chart.yaml | 2 +- charts/agent/templates/daemonset.yaml | 10 ++++++++++ charts/agent/templates/deployment.yaml | 10 ++++++++++ charts/agent/tests/volumes_test.yaml | 17 +++++++++++++++++ charts/sysdig-deploy/Chart.yaml | 4 ++-- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/charts/agent/Chart.yaml b/charts/agent/Chart.yaml index 482509259..0fb8d3645 100644 --- a/charts/agent/Chart.yaml +++ b/charts/agent/Chart.yaml @@ -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 diff --git a/charts/agent/templates/daemonset.yaml b/charts/agent/templates/daemonset.yaml index 7e6c3eacf..b93e66bbc 100644 --- a/charts/agent/templates/daemonset.yaml +++ b/charts/agent/templates/daemonset.yaml @@ -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" .) }} @@ -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" .) }} @@ -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 @@ -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: {} diff --git a/charts/agent/templates/deployment.yaml b/charts/agent/templates/deployment.yaml index 92e1d55df..e924c534f 100644 --- a/charts/agent/templates/deployment.yaml +++ b/charts/agent/templates/deployment.yaml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/charts/agent/tests/volumes_test.yaml b/charts/agent/tests/volumes_test.yaml index 032297f42..6f7276bac 100644 --- a/charts/agent/tests/volumes_test.yaml +++ b/charts/agent/tests/volumes_test.yaml @@ -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: diff --git a/charts/sysdig-deploy/Chart.yaml b/charts/sysdig-deploy/Chart.yaml index bfbea3431..572139dc6 100644 --- a/charts/sysdig-deploy/Chart.yaml +++ b/charts/sysdig-deploy/Chart.yaml @@ -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: alberto.barba@sysdig.com @@ -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