Skip to content

Commit 8fe2206

Browse files
authored
Merge pull request #1446 from k8s-infra-cherrypick-robot/cherry-pick-1439-to-release-1.23
[release-1.23] fix: override aznfs AZURE_ENDPOINT_OVERRIDE
2 parents eec4e9b + 9bdf0c8 commit 8fe2206

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
@@ -334,6 +334,12 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
334334
mountType = NFS
335335
}
336336

337+
if storageEndpointSuffix != "" && mountType == AZNFS {
338+
aznfsEndpoint := strings.Replace(storageEndpointSuffix, "core.", "", 1)
339+
klog.V(2).Infof("set AZURE_ENDPOINT_OVERRIDE to %s", aznfsEndpoint)
340+
os.Setenv("AZURE_ENDPOINT_OVERRIDE", aznfsEndpoint)
341+
}
342+
337343
source := fmt.Sprintf("%s:/%s/%s", serverAddress, accountName, containerName)
338344
mountOptions := util.JoinMountOptions(mountFlags, []string{"sec=sys,vers=3,nolock"})
339345
if err := wait.PollImmediate(1*time.Second, 2*time.Minute, func() (bool, error) {

0 commit comments

Comments
 (0)