Merge pull request #54459 from andyzhangx/azure-change-default-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 #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
This commit is contained in:
Kubernetes Submit Queue 2017-10-26 19:59:28 -07:00 committed by GitHub
commit d85fd8b244

View File

@ -37,6 +37,7 @@ import (
const (
defaultFSType = "ext4"
defaultStorageAccountType = storage.StandardLRS
defaultAzureDiskKind = v1.AzureSharedBlobDisk
)
type dataDisk struct {
@ -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) {