Skip to content

Commit 220bf47

Browse files
committed
use privateendpoint with privatelink in dns name for nfs
1 parent 5f06e91 commit 220bf47

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pkg/blob/controllerserver.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,14 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
316316
}
317317
}
318318

319-
if createPrivateEndpoint {
320-
setKeyValueInMap(parameters, serverNameField, fmt.Sprintf("%s.blob.%s", accountName, storageEndpointSuffix))
319+
if createPrivateEndpoint && protocol == NFS {
320+
// As for blobfuse/blobfuse2, serverName, i.e.,AZURE_STORAGE_BLOB_ENDPOINT env variable can't include
321+
// "privatelink", issue: https://github.com/Azure/azure-storage-fuse/issues/1014
322+
//
323+
// And use public endpoint will be befine to blobfuse/blobfuse2, because it will be resolved to private endpoint
324+
// by private dns zone, which includes CNAME record, documented here:
325+
// https://learn.microsoft.com/en-us/azure/storage/common/storage-private-endpoints?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json#dns-changes-for-private-endpoints
326+
setKeyValueInMap(parameters, serverNameField, fmt.Sprintf("%s.privatelink.blob.%s", accountName, storageEndpointSuffix))
321327
}
322328

323329
accountOptions.Name = accountName

0 commit comments

Comments
 (0)