cluster-api-provider-azure: Fail fast when quota is not sufficient

/kind bug

What steps did you take and what happened: [A clear and concise description of what the bug is.] When creating a cluster in a region where subscription doesn’t have enough quota, it doesn’t fast fail but keeps reconciling

What did you expect to happen: It should fast fail after checking whether it has enough quota in the sub

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

  • cluster-api-provider-azure version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (16 by maintainers)

Most upvoted comments

/assign

To add a bit to @ritazh’s comment above, just for posterity. We also discussed using Compute Usage API to see if there are enough of a VM SKU available.

Might be useful for changes to MachineDeployment / MachinePool validation.

The team discussed what the user experience should be for this issue. Some options are:

  1. If creation failed due to quota issue, then create a K8s event resource to bubble up the error. Continue to reconcile in case quota issue eventually resolves. [This seems to be the behavior for other cluster api providers as well. This is the one we landed on.]
  2. If creation failed due to quota issue, then create a K8s event resource to bubble up the error and skips reconciliation.
  3. If creation failed due to quota issue, then create a K8s event resource to bubble up the error. Continue to reconcile after some duration in case quota issue eventually resolves. [Not clear what this duration should be and where to derive it from.]