Skip to content

Commit

Permalink
Merge pull request kubernetes#54459 from andyzhangx/azure-change-defa…
Browse files Browse the repository at this point in the history
…ult-pv-kind

Automatic merge from submit-queue (batch tested with PRs 53730, 51608, 54459, 54534, 54585). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix azure storage account num exhausting issue

**What this PR does / why we need it**:
If customer is using the default storage class of azure-disk, create lots of azure disk pvs by using default storage class of azure-disk, the storage account num would be exhausted in the azure subscription. Change default `kind` value of azure disk storge class from `Dedicated` to `Shared`, which means only a few storage accounts would be created even there are even hundreds of azure disk PVs.

**Which issue this PR fixes**:
fixes kubernetes#54669
fix storage account num exhausting issue when lots of azure disk pvs are created by using the default storage class of azure-disk

**Special notes for your reviewer**:
fix azure storage account num exhausting issue when lots of azure disk pvs are created by using the default storage class of azure-disk
I would suggest also cherry pick this fix to v1.7, v1.8

**Release note**:

```
fix azure storage account num exhausting issue
```

/sig azure
@karataliu @rootfs @brendanburns
  • Loading branch information
Kubernetes Submit Queue authored Oct 27, 2017
2 parents 90a35f1 + 9bcb82d commit d85fd8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/volume/azure_dd/azure_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
const (
defaultFSType = "ext4"
defaultStorageAccountType = storage.StandardLRS
defaultAzureDiskKind = v1.AzureSharedBlobDisk
)

type dataDisk struct {
Expand Down Expand Up @@ -116,7 +117,7 @@ func normalizeFsType(fsType string) string {

func normalizeKind(kind string) (v1.AzureDataDiskKind, error) {
if kind == "" {
return v1.AzureDedicatedBlobDisk, nil
return defaultAzureDiskKind, nil
}

if !supportedDiskKinds.Has(kind) {
Expand Down

0 comments on commit d85fd8b

Please sign in to comment.