Skip to content

Commit 59aecdc

Browse files
authored
Merge pull request #2155 from k8s-infra-cherrypick-robot/cherry-pick-2151-to-release-1.25
[release-1.25] fix: respect secretName during volume creation
2 parents d82c089 + 11cad84 commit 59aecdc

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)