Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agent): add mount for host's /run vol for all deployment types #1373

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: agent
description: Sysdig Monitor and Secure agent
type: application
# currently matching sysdig 1.14.32
version: 1.13.10
version: 1.13.11
appVersion: 12.16.1
keywords:
- monitoring
Expand Down
20 changes: 5 additions & 15 deletions charts/agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ spec:
- mountPath: /host/proc
name: proc-vol
readOnly: true
- mountPath: /host/run
name: run-vol
- mountPath: /dev/shm
name: dshm
- mountPath: /opt/draios/etc/kubernetes/config
Expand Down Expand Up @@ -251,8 +253,6 @@ spec:
readOnly: true
- mountPath: /host/var/lib
name: varlib-vol
- mountPath: /host/run
name: run-vol
- mountPath: /host/var/run
name: varrun-vol
{{- if (include "agent.ebpfEnabled" .) }}
Expand All @@ -271,8 +271,6 @@ spec:
readOnly: true
- mountPath: /host/var/lib
name: varlib-vol
- mountPath: /host/run
name: run-vol
- mountPath: /host/var/run
name: varrun-vol
{{- if (include "agent.ebpfEnabled" .) }}
Expand All @@ -298,8 +296,6 @@ spec:
- mountPath: /host/usr
name: usr-vol
readOnly: true
- mountPath: /host/run
name: run-vol
- mountPath: /host/var/run
name: varrun-vol
{{- end }}
Expand All @@ -326,6 +322,9 @@ spec:
- name: proc-vol
hostPath:
path: /proc
- name: run-vol
hostPath:
path: /run
- name: dshm
emptyDir:
medium: Memory
Expand Down Expand Up @@ -386,9 +385,6 @@ spec:
- name: varlib-vol
hostPath:
path: /var/lib
- name: run-vol
hostPath:
path: /run
- name: varrun-vol
hostPath:
path: /var/run
Expand All @@ -415,9 +411,6 @@ spec:
- name: usr-vol
hostPath:
path: /usr
- name: run-vol
hostPath:
path: /run
- name: varrun-vol
hostPath:
path: /var/run
Expand Down Expand Up @@ -450,9 +443,6 @@ spec:
- name: usr-vol
hostPath:
path: /usr
- name: run-vol
hostPath:
path: /run
- name: varrun-vol
hostPath:
path: /var/run
Expand Down
8 changes: 6 additions & 2 deletions charts/agent/tests/gke_autopilot_volumes_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ tests:
path: spec.template.spec.volumes[?(@.hostPath.path == "/etc/os-release")]
- isNotNull:
path: spec.template.spec.volumes[?(@.hostPath.path == "/boot")]
- isNotNull:
path: spec.template.spec.volumes[?(@.hostPath.path == "/run")]
- isNotNull:
path: spec.template.spec.volumes[?(@.hostPath.path == "/var/run/containerd/containerd.sock")]
# This seems not work as expected, need deeper investigation
Expand All @@ -60,7 +62,7 @@ tests:
# count: 5
# We are going to use this "workaround" until we found a proper solution
- isNull:
path: spec.template.spec.volumes[?(@.hostPath.path =~ /\/.*/ && @.hostPath.path != "/dev" && @.hostPath.path != "/proc" && @.hostPath.path != "/etc/os-release" && @.hostPath.path != "/boot" && @.hostPath.path != "/var/run/containerd/containerd.sock")]
path: spec.template.spec.volumes[?(@.hostPath.path =~ /\/.*/ && @.hostPath.path != "/run" && @.hostPath.path != "/dev" && @.hostPath.path != "/proc" && @.hostPath.path != "/etc/os-release" && @.hostPath.path != "/boot" && @.hostPath.path != "/var/run/containerd/containerd.sock")]

- it: Ensure only the right volumes are mounted when running on GKE Autopilot, the agent is slim mode with eBPF
set:
Expand Down Expand Up @@ -108,6 +110,8 @@ tests:
path: spec.template.spec.volumes[?(@.hostPath.path == "/dev")]
- isNotNull:
path: spec.template.spec.volumes[?(@.hostPath.path == "/proc")]
- isNotNull:
path: spec.template.spec.volumes[?(@.hostPath.path == "/run")]
- isNotNull:
path: spec.template.spec.volumes[?(@.hostPath.path == "/etc/os-release")]
- isNotNull:
Expand All @@ -120,4 +124,4 @@ tests:
# count: 5
# We are going to use this "workaround" until we found a proper solution
- isNull:
path: spec.template.spec.volumes[?(@.hostPath.path =~ /\/.*/ && @.hostPath.path != "/dev" && @.hostPath.path != "/proc" && @.hostPath.path != "/etc/os-release" && @.hostPath.path != "/boot" && @.hostPath.path != "/var/run/containerd/containerd.sock")]
path: spec.template.spec.volumes[?(@.hostPath.path =~ /\/.*/ && @.hostPath.path != "/run" && @.hostPath.path != "/dev" && @.hostPath.path != "/proc" && @.hostPath.path != "/etc/os-release" && @.hostPath.path != "/boot" && @.hostPath.path != "/var/run/containerd/containerd.sock")]
Loading