Skip to content

Commit 59e8f77

Browse files
committed
fix: enable mount options
Signed-off-by: ZeroMagic <[email protected]>
1 parent cbe5ee2 commit 59e8f77

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

charts/latest/blobfuse-csi-driver/templates/csi-blobfuse-node.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ spec:
9494
name: blobfuse-bin
9595
- mountPath: /mnt
9696
name: blobfuse-cache
97+
- mountPath: /etc/fuse.conf
98+
name: fuse-conf
9799
volumes:
98100
- hostPath:
99101
path: /var/lib/kubelet/plugins/blobfuse.csi.azure.com
@@ -120,4 +122,7 @@ spec:
120122
- hostPath:
121123
path: /mnt
122124
name: blobfuse-cache
123-
125+
- hostPath:
126+
path: /etc/fuse.conf
127+
type: FileOrCreate
128+
name: fuse-conf

deploy/csi-blobfuse-node.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ spec:
9393
name: blobfuse-bin
9494
- mountPath: /mnt
9595
name: blobfuse-cache
96+
- mountPath: /etc/fuse.conf
97+
name: fuse-conf
9698
volumes:
9799
- hostPath:
98100
path: /var/lib/kubelet/plugins/blobfuse.csi.azure.com
@@ -119,3 +121,7 @@ spec:
119121
- hostPath:
120122
path: /mnt
121123
name: blobfuse-cache
124+
- hostPath:
125+
path: /etc/fuse.conf
126+
type: FileOrCreate
127+
name: fuse-conf

pkg/blobfuse/nodeserver.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"strings"
2525

2626
"github.com/container-storage-interface/spec/lib/go/csi"
27-
"github.com/csi-driver/blobfuse-csi-driver/pkg/util"
2827
"k8s.io/klog"
2928
k8sutil "k8s.io/kubernetes/pkg/volume/util"
3029

@@ -122,8 +121,11 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
122121
klog.V(2).Infof("target %v\nfstype %v\n\nreadonly %v\nvolumeId %v\ncontext %v\nmountflags %v\nmountOptions %v\n",
123122
targetPath, fsType, readOnly, volumeID, attrib, mountFlags, mountOptions)
124123

125-
cmd := exec.Command("/usr/blob/blobfuse", targetPath, "--tmp-path=/mnt/"+volumeID,
126-
"--container-name="+containerName, util.GetMountOptions(mountOptions))
124+
args := targetPath + " " + "--tmp-path=/mnt/" + volumeID + " " + "--container-name=" + containerName
125+
for _, opt := range mountOptions {
126+
args = args + " " + opt
127+
}
128+
cmd := exec.Command("/usr/blob/blobfuse", strings.Split(args, " ")...)
127129
cmd.Env = append(os.Environ(), "AZURE_STORAGE_ACCOUNT="+accountName, "AZURE_STORAGE_ACCESS_KEY="+accountKey)
128130
output, err := cmd.CombinedOutput()
129131
if err != nil {

0 commit comments

Comments
 (0)