Skip to content

Commit c9ce4f3

Browse files
authored
Merge pull request #123 from jsafrane/run-privileged
Run all containers as privileged
2 parents 5ce1e19 + f55bc32 commit c9ce4f3

File tree

6 files changed

+33
-1
lines changed

6 files changed

+33
-1
lines changed

deploy/kubernetes-1.16/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

deploy/kubernetes-1.16/hostpath/csi-hostpath-plugin.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ spec:
3434
labels:
3535
app: csi-hostpathplugin
3636
spec:
37-
hostNetwork: true
3837
containers:
3938
- name: node-driver-registrar
4039
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
@@ -47,6 +46,9 @@ spec:
4746
- --csi-address=/csi/csi.sock
4847
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock
4948
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.
5052
privileged: true
5153
env:
5254
- name: KUBE_NODE_NAME
@@ -108,6 +110,11 @@ spec:
108110
volumeMounts:
109111
- mountPath: /csi
110112
name: socket-dir
113+
securityContext:
114+
# This is necessary only for systems with SELinux, where
115+
# non-privileged sidecar containers cannot access unix domain socket
116+
# created by privileged CSI driver container.
117+
privileged: true
111118
image: quay.io/k8scsi/livenessprobe:v1.1.0
112119
args:
113120
- --csi-address=/csi/csi.sock

deploy/kubernetes-1.16/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
- --csi-address=/csi/csi.sock
4747
- --connection-timeout=15s
4848
- --feature-gates=Topology=true
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

deploy/kubernetes-1.16/hostpath/csi-hostpath-resizer.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

deploy/kubernetes-1.16/hostpath/csi-hostpath-snapshotter.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ spec:
4545
- -v=5
4646
- --csi-address=/csi/csi.sock
4747
- --connection-timeout=15s
48+
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.
52+
privileged: true
4853
volumeMounts:
4954
- mountPath: /csi
5055
name: socket-dir

deploy/kubernetes-1.16/hostpath/csi-hostpath-testing.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ spec:
4949
args:
5050
- tcp-listen:10000,fork,reuseaddr
5151
- unix-connect:/csi/csi.sock
52+
securityContext:
53+
# This is necessary only for systems with SELinux, where
54+
# non-privileged sidecar containers cannot access unix domain socket
55+
# created by privileged CSI driver container.
56+
privileged: true
5257
volumeMounts:
5358
- mountPath: /csi
5459
name: socket-dir

0 commit comments

Comments
 (0)