Merge pull request #40066 from vwfs/reduce_azure_polling_time

Automatic merge from submit-queue

Set custom PollingDelay of 5 seconds for Azure VirtualMachinesClient

The default polling delay of 1 minute results in very long delays when
an Azure Disk is attached to a node. It gets worse as go-autorest
doubles the default delay to 2 minutes.

Please see: https://github.com/kubernetes/kubernetes/issues/35180#issuecomment-273085063

Only the PollingDelay for VirtualMachinesClient is modified here to
avoid too much pressure on Azure quotas.

Release Nodes:
```release-note
Reduce time needed to attach Azure disks
```
This commit is contained in:
Kubernetes Submit Queue 2017-01-23 01:16:25 -08:00 committed by GitHub
commit 5356a16f01

View File

@ -27,6 +27,7 @@ import (
"github.com/Azure/azure-sdk-for-go/arm/storage"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/ghodss/yaml"
"time"
)
// CloudProviderName is the value used for the --cloud-provider flag
@ -128,6 +129,7 @@ func NewCloud(configReader io.Reader) (cloudprovider.Interface, error) {
az.VirtualMachinesClient = compute.NewVirtualMachinesClient(az.SubscriptionID)
az.VirtualMachinesClient.BaseURI = az.Environment.ResourceManagerEndpoint
az.VirtualMachinesClient.Authorizer = servicePrincipalToken
az.VirtualMachinesClient.PollingDelay = 5 * time.Second
az.PublicIPAddressesClient = network.NewPublicIPAddressesClient(az.SubscriptionID)
az.PublicIPAddressesClient.BaseURI = az.Environment.ResourceManagerEndpoint