Skip to content

Commit 852afa2

Browse files
authored
Merge pull request #2151 from andyzhangx/respect-secretName
fix: respect secretName during volume creation
2 parents 48c2861 + 4e26a30 commit 852afa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/blob/controllerserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
443443
}
444444

445445
accountOptions.Name = accountName
446-
if len(secrets) == 0 && useDataPlaneAPI {
446+
if len(secrets) == 0 && (useDataPlaneAPI || secretName != "") {
447447
if accountKey == "" {
448448
if accountName, accountKey, err = d.GetStorageAccesskey(ctx, accountOptions, secrets, secretName, secretNamespace); err != nil {
449449
return nil, status.Errorf(codes.Internal, "failed to GetStorageAccesskey on account(%s) rg(%s), error: %v", accountOptions.Name, accountOptions.ResourceGroup, err)

0 commit comments

Comments
 (0)