Skip to content

Commit a385930

Browse files
committed
Mount whole /run and /var/run inside agent containers
We need this to access the CRI socket, when present.
1 parent 12537d3 commit a385930

File tree

4 files changed

+40
-24
lines changed

4 files changed

+40
-24
lines changed

agent_deploy/kubernetes/sysdig-agent-daemonset-v1.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ spec:
2121
- name: dshm
2222
emptyDir:
2323
medium: Memory
24-
- name: docker-sock
25-
hostPath:
26-
path: /var/run/docker.sock
2724
- name: dev-vol
2825
hostPath:
2926
path: /dev
@@ -39,6 +36,12 @@ spec:
3936
- name: usr-vol
4037
hostPath:
4138
path: /usr
39+
- name: run-vol
40+
hostPath:
41+
path: /run
42+
- name: varrun-vol
43+
hostPath:
44+
path: /var/run
4245
hostNetwork: true
4346
hostPID: true
4447
tolerations:
@@ -89,9 +92,6 @@ spec:
8992
# new_k8s: true
9093
# k8s_cluster_name: production
9194
volumeMounts:
92-
- mountPath: /host/var/run/docker.sock
93-
name: docker-sock
94-
readOnly: false
9595
- mountPath: /host/dev
9696
name: dev-vol
9797
readOnly: false
@@ -107,5 +107,9 @@ spec:
107107
- mountPath: /host/usr
108108
name: usr-vol
109109
readOnly: true
110+
- mountPath: /host/run
111+
name: run-vol
112+
- mountPath: /host/var/run
113+
name: varrun-vol
110114
- mountPath: /dev/shm
111115
name: dshm

agent_deploy/kubernetes/sysdig-agent-daemonset-v2.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ spec:
1717
- name: dshm
1818
emptyDir:
1919
medium: Memory
20-
- name: docker-sock
21-
hostPath:
22-
path: /var/run/docker.sock
2320
- name: dev-vol
2421
hostPath:
2522
path: /dev
@@ -35,6 +32,12 @@ spec:
3532
- name: usr-vol
3633
hostPath:
3734
path: /usr
35+
- name: run-vol
36+
hostPath:
37+
path: /run
38+
- name: varrun-vol
39+
hostPath:
40+
path: /var/run
3841
- name: sysdig-agent-config
3942
configMap:
4043
name: sysdig-agent
@@ -70,9 +73,6 @@ spec:
7073
command: [ "test", "-e", "/opt/draios/logs/running" ]
7174
initialDelaySeconds: 10
7275
volumeMounts:
73-
- mountPath: /host/var/run/docker.sock
74-
name: docker-sock
75-
readOnly: false
7676
- mountPath: /host/dev
7777
name: dev-vol
7878
readOnly: false
@@ -88,6 +88,10 @@ spec:
8888
- mountPath: /host/usr
8989
name: usr-vol
9090
readOnly: true
91+
- mountPath: /host/run
92+
name: run-vol
93+
- mountPath: /host/var/run
94+
name: varrun-vol
9195
- mountPath: /dev/shm
9296
name: dshm
9397
- mountPath: /opt/draios/etc/kubernetes/config

agent_deploy/kubernetes/sysdig-agent-slim-daemonset-v1.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ spec:
2121
- name: dshm
2222
emptyDir:
2323
medium: Memory
24-
- name: docker-sock
25-
hostPath:
26-
path: /var/run/docker.sock
2724
- name: dev-vol
2825
hostPath:
2926
path: /dev
@@ -39,6 +36,12 @@ spec:
3936
- name: usr-vol
4037
hostPath:
4138
path: /usr
39+
- name: run-vol
40+
hostPath:
41+
path: /run
42+
- name: varrun-vol
43+
hostPath:
44+
path: /var/run
4245
hostNetwork: true
4346
hostPID: true
4447
tolerations:
@@ -113,14 +116,15 @@ spec:
113116
# new_k8s: true
114117
# k8s_cluster_name: production
115118
volumeMounts:
116-
- mountPath: /host/var/run/docker.sock
117-
name: docker-sock
118-
readOnly: false
119119
- mountPath: /host/dev
120120
name: dev-vol
121121
readOnly: false
122122
- mountPath: /host/proc
123123
name: proc-vol
124124
readOnly: true
125+
- mountPath: /host/run
126+
name: run-vol
127+
- mountPath: /host/var/run
128+
name: varrun-vol
125129
- mountPath: /dev/shm
126130
name: dshm

agent_deploy/kubernetes/sysdig-agent-slim-daemonset-v2.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ spec:
1717
- name: dshm
1818
emptyDir:
1919
medium: Memory
20-
- name: docker-sock
21-
hostPath:
22-
path: /var/run/docker.sock
2320
- name: dev-vol
2421
hostPath:
2522
path: /dev
@@ -35,6 +32,12 @@ spec:
3532
- name: usr-vol
3633
hostPath:
3734
path: /usr
35+
- name: run-vol
36+
hostPath:
37+
path: /run
38+
- name: varrun-vol
39+
hostPath:
40+
path: /var/run
3841
- name: sysdig-agent-config
3942
configMap:
4043
name: sysdig-agent
@@ -93,15 +96,16 @@ spec:
9396
command: [ "test", "-e", "/opt/draios/logs/running" ]
9497
initialDelaySeconds: 10
9598
volumeMounts:
96-
- mountPath: /host/var/run/docker.sock
97-
name: docker-sock
98-
readOnly: false
9999
- mountPath: /host/dev
100100
name: dev-vol
101101
readOnly: false
102102
- mountPath: /host/proc
103103
name: proc-vol
104104
readOnly: true
105+
- mountPath: /host/run
106+
name: run-vol
107+
- mountPath: /host/var/run
108+
name: varrun-vol
105109
- mountPath: /dev/shm
106110
name: dshm
107111
- mountPath: /opt/draios/etc/kubernetes/config

0 commit comments

Comments
 (0)