Merge pull request #64957 from andyzhangx/azure-account-https

Automatic merge from submit-queue (batch tested with PRs 64895, 64938, 63700, 65050, 64957). 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>.

set EnableHTTPSTrafficOnly in azure storage account creation

**What this PR does / why we need it**:
Enforce azure storage account creation with https traffic only, this PR will apply for both azure disk & azure file features.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #64956

**Special notes for your reviewer**:
Tests with azure disk & azure file all pass

**Release note**:

```
Enforce azure storage account creation with https traffic only
```

/sig azure
/kind feature
/assign @khenidak
This commit is contained in:
Kubernetes Submit Queue 2018-06-21 04:15:20 -07:00 committed by GitHub
commit 0765e0a6cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,8 @@ func (az *Cloud) ensureStorageAccount(accountName, accountType, location, genAcc
glog.V(2).Infof("azure - no matching account found, begin to create a new account %s in resource group %s, location: %s, accountType: %s",
accountName, az.ResourceGroup, location, accountType)
cp := storage.AccountCreateParameters{
Sku: &storage.Sku{Name: storage.SkuName(accountType)},
Sku: &storage.Sku{Name: storage.SkuName(accountType)},
AccountPropertiesCreateParameters: &storage.AccountPropertiesCreateParameters{EnableHTTPSTrafficOnly: to.BoolPtr(true)},
Tags: map[string]*string{"created-by": to.StringPtr("azure")},
Location: &location}