Skip to content

Commit 622c346

Browse files
committed
fix: override aznfs AZURE_ENDPOINT_OVERRIDE
fix
1 parent f0a2ddd commit 622c346

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/blob/nodeserver.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,12 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
349349
mountType = NFS
350350
}
351351

352+
if storageEndpointSuffix != "" && mountType == AZNFS {
353+
aznfsEndpoint := strings.Replace(storageEndpointSuffix, "core.", "", 1)
354+
klog.V(2).Infof("set AZURE_ENDPOINT_OVERRIDE to %s", aznfsEndpoint)
355+
os.Setenv("AZURE_ENDPOINT_OVERRIDE", aznfsEndpoint)
356+
}
357+
352358
source := fmt.Sprintf("%s:/%s/%s", serverAddress, accountName, containerName)
353359
mountOptions := util.JoinMountOptions(mountFlags, []string{"sec=sys,vers=3,nolock"})
354360
execFunc := func() error { return d.mounter.MountSensitive(source, targetPath, mountType, mountOptions, []string{}) }

0 commit comments

Comments
 (0)