Skip to content

Commit 11cad84

Browse files
andyzhangxk8s-infra-cherrypick-robot
authored andcommitted
fix: respect secretName during volume creation
1 parent ec0d39c commit 11cad84

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
@@ -435,7 +435,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
435435
}
436436

437437
accountOptions.Name = accountName
438-
if len(secrets) == 0 && useDataPlaneAPI {
438+
if len(secrets) == 0 && (useDataPlaneAPI || secretName != "") {
439439
if accountKey == "" {
440440
if accountName, accountKey, err = d.GetStorageAccesskey(ctx, accountOptions, secrets, secretName, secretNamespace); err != nil {
441441
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)