Skip to content

Commit

Permalink
load resource group name from cloud conf earlier if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBednar authored and k8s-infra-cherrypick-robot committed Oct 10, 2023
1 parent 8feb5bf commit 12481b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/azurefile/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
}
}

if resourceGroup == "" {
resourceGroup = d.cloud.ResourceGroup
}

fileShareSize := int(requestGiB)
// account kind should be FileStorage for Premium File
accountKind := string(storage.KindStorageV2)
Expand Down Expand Up @@ -387,10 +391,6 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
validFileShareName = getValidFileShareName(name)
}

if resourceGroup == "" {
resourceGroup = d.cloud.ResourceGroup
}

tags, err := ConvertTagsToMap(customTags)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
Expand Down

0 comments on commit 12481b6

Please sign in to comment.