fix: mount the host's /run/nvmf directory to csi-node-driver

This commit is contained in:
haruband 2023-05-03 10:58:51 +09:00
parent 4ed3393c06
commit 435f03c595
2 changed files with 7 additions and 6 deletions

View File

@ -73,6 +73,8 @@ spec:
- name: pods-mount-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: "Bidirectional"
- name: run-nvmf-dir
mountPath: /run/nvmf
- name: host-dev
mountPath: /dev
mountPropagation: "HostToContainer"
@ -94,6 +96,10 @@ spec:
hostPath:
path: /var/lib/kubelet/pods
type: Directory
- name: run-nvmf-dir
hostPath:
path: /run/nvmf
type: DirectoryOrCreate
- name: host-dev
hostPath:
path: /dev
@ -102,4 +108,4 @@ spec:
path: /sys
- name: lib-modules
hostPath:
path: /lib/modules
path: /lib/modules

View File

@ -32,11 +32,6 @@ type NodeServer struct {
}
func NewNodeServer(d *driver) *NodeServer {
if err := os.MkdirAll(RUN_NVMF, 0750); err != nil {
klog.Errorf("NewNodeServer: failed to mkdir %s, error: %v", RUN_NVMF, err)
return nil
}
return &NodeServer{
Driver: d,
}