Azure / azure-capi-cli-extension

Kubernetes Cluster API support in the Azure CLI
MIT License
20 stars 18 forks source link

`az capi create` should be able to wait for all nodes to be Ready #158

Closed mboersma closed 1 year ago

mboersma commented 1 year ago

Currently az capi create seems to return as soon as the control plane is available and some kubectl commands return. There is likely to be ongoing provisioning of resources, so arguably the cluster isn't really ready at this point.

We could add an optional flag like --wait-for-nodes which would add the --control-plane-machine-count to the --node-machine-count values and then loop until that many nodes are Ready before returning from az capi create.

If a value is specified such as --wait-for-nodes=4, we use that value instead of adding the other two. This is to handle cases where the simple addition logic fails, such as multiple node pools all respecting --node-machine-count or a hard-coded user template that ignores it.

willie-yao commented 1 year ago

/assign