mirror of
https://github.com/kubernetes-csi/csi-driver-nvmf.git
synced 2025-08-26 00:58:53 +00:00
fix: mount the host's /run/nvmf directory to csi-node-driver
This commit is contained in:
parent
4ed3393c06
commit
435f03c595
@ -73,6 +73,8 @@ spec:
|
|||||||
- name: pods-mount-dir
|
- name: pods-mount-dir
|
||||||
mountPath: /var/lib/kubelet/pods
|
mountPath: /var/lib/kubelet/pods
|
||||||
mountPropagation: "Bidirectional"
|
mountPropagation: "Bidirectional"
|
||||||
|
- name: run-nvmf-dir
|
||||||
|
mountPath: /run/nvmf
|
||||||
- name: host-dev
|
- name: host-dev
|
||||||
mountPath: /dev
|
mountPath: /dev
|
||||||
mountPropagation: "HostToContainer"
|
mountPropagation: "HostToContainer"
|
||||||
@ -94,6 +96,10 @@ spec:
|
|||||||
hostPath:
|
hostPath:
|
||||||
path: /var/lib/kubelet/pods
|
path: /var/lib/kubelet/pods
|
||||||
type: Directory
|
type: Directory
|
||||||
|
- name: run-nvmf-dir
|
||||||
|
hostPath:
|
||||||
|
path: /run/nvmf
|
||||||
|
type: DirectoryOrCreate
|
||||||
- name: host-dev
|
- name: host-dev
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /dev
|
path: /dev
|
||||||
|
@ -32,11 +32,6 @@ type NodeServer struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewNodeServer(d *driver) *NodeServer {
|
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{
|
return &NodeServer{
|
||||||
Driver: d,
|
Driver: d,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user