Skip to content

Commit 7b1b88f

Browse files
andyzhangxk8s-infra-cherrypick-robot
authored andcommitted
fix: storageEndPointSuffix in on-prem cluster
1 parent 7b332e2 commit 7b1b88f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pkg/azurefile/azurefile.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,11 @@ func (d *Driver) getFileShareQuota(ctx context.Context, accountOptions *storage.
481481
if err != nil {
482482
return -1, err
483483
}
484-
if fileClient, err = newAzureFileClient(accountName, accountKey, d.getStorageEndPointSuffix()); err != nil {
484+
storageEndPointSuffix := d.getStorageEndPointSuffix()
485+
if accountOptions != nil && accountOptions.StorageEndpointSuffix != "" {
486+
storageEndPointSuffix = accountOptions.StorageEndpointSuffix
487+
}
488+
if fileClient, err = newAzureFileClient(accountName, accountKey, storageEndPointSuffix); err != nil {
485489
return -1, err
486490
}
487491
} else {
@@ -948,7 +952,11 @@ func (d *Driver) CreateFileShare(ctx context.Context, accountOptions *storage.Ac
948952
if err != nil {
949953
return true, err
950954
}
951-
if fileClient, err = newAzureFileClient(accountName, accountKey, d.getStorageEndPointSuffix()); err != nil {
955+
storageEndPointSuffix := d.getStorageEndPointSuffix()
956+
if accountOptions != nil && accountOptions.StorageEndpointSuffix != "" {
957+
storageEndPointSuffix = accountOptions.StorageEndpointSuffix
958+
}
959+
if fileClient, err = newAzureFileClient(accountName, accountKey, storageEndPointSuffix); err != nil {
952960
return true, err
953961
}
954962
} else {

0 commit comments

Comments
 (0)