Skip to content

Commit

Permalink
Merge pull request #1430 from kubernetes-sigs/revert-1309-fix-RandomM…
Browse files Browse the repository at this point in the history
…atchingAccount-1.28

[release-1.28] Revert 1309 fix random matching account 1.28
  • Loading branch information
andyzhangx authored Sep 7, 2023
2 parents 2e52c55 + e527324 commit a3ba54f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/driver-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requireInfraEncryption | specify whether or not the service applies a secondary
storageEndpointSuffix | specify Azure storage endpoint suffix | `core.windows.net`, `core.chinacloudapi.cn`, etc | No | if empty, driver will use default storage endpoint suffix according to cloud environment, e.g. `core.windows.net`
tags | [tags](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources) would be created in newly created storage account | tag format: 'foo=aaa,bar=bbb' | No | ""
matchTags | whether matching tags when driver tries to find a suitable storage account | `true`,`false` | No | `false`
selectRandomMatchingAccount | whether randomly selecting a matching account, by default, the driver would always select the first matching account | `true`,`false` | No | `false`
selectRandomMatchingAccount | whether randomly selecting a matching account, by default, the driver would always select the first matching account in alphabetical order(note: this driver uses account search cache, which results in uneven distribution of file creation across multiple accounts) | `true`,`false` | No | `false`
accountQuota | to limit the quota for an account, you can specify a maximum quota in GB (`102400`GB by default). If the account exceeds the specified quota, the driver would skip selecting the account | `` | No | `102400`
--- | **Following parameters are only for SMB protocol** | --- | --- |
subscriptionID | specify Azure subscription ID where Azure file share will be created | Azure subscription ID | No | if not empty, `resourceGroup` must be provided
Expand Down
2 changes: 1 addition & 1 deletion pkg/azurefile/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
if err != nil {
return nil, status.Errorf(codes.Internal, err.Error())
}
if cache != nil && !selectRandomMatchingAccount {
if cache != nil {
accountName = cache.(string)
} else {
d.volLockMap.LockEntry(lockKey)
Expand Down

0 comments on commit a3ba54f

Please sign in to comment.