• Kubernetes Submit Queue's avatar
    Merge pull request #46660 from jackfrancis/azure-cloudprovider-backoff · 3adb9b42
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 43005, 46660, 46385, 46991, 47103)
    
    Azure cloudprovider retry using flowcontrol
    
    An initial attempt at engaging exponential backoff for API error responses.
    
    Addresses #47048
    
    Uses k8s.io/client-go/util/flowcontrol; implementation inspired by GCE
    cloudprovider backoff.
    
    
    
    **What this PR does / why we need it**:
    
    The existing azure cloudprovider implementation has no guard rails in place to adapt to unexpected underlying operational conditions (i.e., clogs in resource plumbing between k8s runtime and the cloud API). The purpose of these changes is to support exponential backoff wrapping around API calls; and to support targeted rate limiting. Both of these options are configurable via `--cloud-config`.
    
    Implementation inspired by the GCE's use of `k8s.io/client-go/util/flowcontrol` and `k8s.io/apimachinery/pkg/util/wait`, this PR likewise uses `flowcontrol` for rate limiting; and `wait` to thinly wrap backoff retry attempts to the API.
    
    **Special notes for your reviewer**:
    
    
    Pay especial note to the declaration of retry-able conditions from an unsuccessful HTTP request:
    - all `4xx` and `5xx` HTTP responses
    - non-nil error responses
    
    And the declaration of retry success conditions:
    - `2xx` HTTP responses
    
    Tests updated to include additions to `Config`.
    
    Those may be incomplete, or in other ways non-representative.
    
    **Release note**:
    
    ```release-note
    Added exponential backoff to Azure cloudprovider
    ```
    3adb9b42
Name
Last commit
Last update
..
providers Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
cloud.go Loading commit data...
doc.go Loading commit data...
plugins.go Loading commit data...