Skip to content

Commit 40d7633

Browse files
authored
Merge pull request #7149 from laozc/nvidia-gpu-sec
Do not run GPU plugin under priviledge mode
2 parents 5595564 + 566196c commit 40d7633

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

deploy/addons/gpu/nvidia-gpu-device-plugin.yaml

+3-6
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ spec:
4242
- name: device-plugin
4343
hostPath:
4444
path: /var/lib/kubelet/device-plugins
45-
- name: dev
46-
hostPath:
47-
path: /dev
4845
containers:
4946
- image: "nvidia/k8s-device-plugin:1.0.0-beta4"
5047
command: ["/usr/bin/nvidia-device-plugin", "-logtostderr"]
@@ -54,11 +51,11 @@ spec:
5451
cpu: 50m
5552
memory: 10Mi
5653
securityContext:
57-
privileged: true
54+
allowPrivilegeEscalation: false
55+
capabilities:
56+
drop: ["ALL"]
5857
volumeMounts:
5958
- name: device-plugin
6059
mountPath: /var/lib/kubelet/device-plugins
61-
- name: dev
62-
mountPath: /dev
6360
updateStrategy:
6461
type: RollingUpdate

0 commit comments

Comments
 (0)