mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
add csi volume device mount path to csi plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
parent
263c45bb45
commit
48407e2484
@ -72,6 +72,9 @@ spec:
|
|||||||
- name: pods-mount-dir
|
- name: pods-mount-dir
|
||||||
mountPath: /var/lib/kubelet/pods
|
mountPath: /var/lib/kubelet/pods
|
||||||
mountPropagation: "Bidirectional"
|
mountPropagation: "Bidirectional"
|
||||||
|
- name: plugin-mount-dir
|
||||||
|
mountPath: /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices/
|
||||||
|
mountPropagation: "Bidirectional"
|
||||||
- mountPath: /dev
|
- mountPath: /dev
|
||||||
name: host-dev
|
name: host-dev
|
||||||
- mountPath: /rootfs
|
- mountPath: /rootfs
|
||||||
|
@ -55,7 +55,7 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
|||||||
} else {
|
} else {
|
||||||
// Get volName from targetPath
|
// Get volName from targetPath
|
||||||
if !strings.HasSuffix(targetPath, "/mount") {
|
if !strings.HasSuffix(targetPath, "/mount") {
|
||||||
return nil, fmt.Errorf("rnd: malformed the value of target path: %s", targetPath)
|
return nil, fmt.Errorf("rbd: malformed the value of target path: %s", targetPath)
|
||||||
}
|
}
|
||||||
s := strings.Split(strings.TrimSuffix(targetPath, "/mount"), "/")
|
s := strings.Split(strings.TrimSuffix(targetPath, "/mount"), "/")
|
||||||
volName = s[len(s)-1]
|
volName = s[len(s)-1]
|
||||||
|
Loading…
Reference in New Issue
Block a user