Skip to content

Commit 864596f

Browse files
authored
Merge pull request kubernetes#85947 from jsafrane/privileged-hostpath
Run all csi-hostpath containers as privileged
2 parents a3718d7 + d3c562f commit 864596f

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-attacher.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ spec:
4444
args:
4545
- --v=5
4646
- --csi-address=/csi/csi.sock
47+
securityContext:
48+
# This is necessary only for systems with SELinux, where
49+
# non-privileged sidecar containers cannot access unix domain socket
50+
# created by privileged CSI driver container.
51+
privileged: true
4752
volumeMounts:
4853
- mountPath: /csi
4954
name: socket-dir

test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-plugin.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ spec:
4646
- --csi-address=/csi/csi.sock
4747
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock
4848
securityContext:
49+
# This is necessary only for systems with SELinux, where
50+
# non-privileged sidecar containers cannot access unix domain socket
51+
# created by privileged CSI driver container.
4952
privileged: true
5053
env:
5154
- name: KUBE_NODE_NAME

test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-provisioner.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ spec:
4646
- -v=5
4747
- --csi-address=/csi/csi.sock
4848
- --connection-timeout=15s
49+
securityContext:
50+
# This is necessary only for systems with SELinux, where
51+
# non-privileged sidecar containers cannot access unix domain socket
52+
# created by privileged CSI driver container.
53+
privileged: true
4954
volumeMounts:
5055
- mountPath: /csi
5156
name: socket-dir

test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-resizer.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ spec:
3737
env:
3838
- name: ADDRESS
3939
value: /csi/csi.sock
40+
securityContext:
41+
# This is necessary only for systems with SELinux, where
42+
# non-privileged sidecar containers cannot access unix domain socket
43+
# created by privileged CSI driver container.
44+
privileged: true
4045
imagePullPolicy: Always
4146
volumeMounts:
4247
- mountPath: /csi

test/e2e/testing-manifests/storage-csi/hostpath/hostpath/csi-hostpath-snapshotter.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ spec:
3838
env:
3939
- name: ADDRESS
4040
value: /csi/csi.sock
41+
securityContext:
42+
# This is necessary only for systems with SELinux, where
43+
# non-privileged sidecar containers cannot access unix domain socket
44+
# created by privileged CSI driver container.
45+
privileged: true
4146
imagePullPolicy: Always
4247
volumeMounts:
4348
- name: socket-dir

0 commit comments

Comments
 (0)