mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-24 18:35:10 +00:00
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 ```