Skip to content

Commit

Permalink
Update device plugins volumes mounts
Browse files Browse the repository at this point in the history
There is no need to mount the whole '/var/lib/kubelet/' directory
into a pod. It's enough to mount only '/var/lib/kubelet/device-plugins'
and '/var/lib/kubelet/plugins_registry' directories.

Signed-off-by: Ivan Kolodiazhny <ikolodiazhny@nvidia.com>
  • Loading branch information
e0ne committed Sep 7, 2023
1 parent b3d2b2a commit 561ea67
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions images/k8s-rdma-shared-dev-plugin-ds-pre-1.16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,20 @@ spec:
privileged: true
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/
mountPath: /var/lib/kubelet/device-plugins
readOnly: false
- name: plugins-registry
mountPath: /var/lib/kubelet/plugins_registry
readOnly: false
- name: config
mountPath: /k8s-rdma-shared-dev-plugin
volumes:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/
path: /var/lib/kubelet/device-plugins
- name: plugins-registry
hostPath:
path: /var/lib/kubelet/plugins_registry
- name: config
configMap:
name: rdma-devices
Expand Down
11 changes: 9 additions & 2 deletions images/k8s-rdma-shared-dev-plugin-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,22 @@ spec:
privileged: true
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/
mountPath: /var/lib/kubelet/device-plugins
readOnly: false
- name: plugins-registry
mountPath: /var/lib/kubelet/plugins_registry
readOnly: false
- name: config
mountPath: /k8s-rdma-shared-dev-plugin
- name: devs
mountPath: /dev/
volumes:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/
path: /var/lib/kubelet/device-plugins
- name: plugins-registry
hostPath:
path: /var/lib/kubelet/plugins_registry
- name: config
configMap:
name: rdma-devices
Expand Down

0 comments on commit 561ea67

Please sign in to comment.