The logic is simple: we check Cluster.status.failureDomains field and, if there are any, select the less used one and add it to the machine spec.
But it takes some time for the infrastructure controller to publish failure domains, so the reconciliation logic is a bit reordered: we wait for the first controller to start before creating other ones. It should not slow down the overall process of provisioning since we wait for the first controller anyway to be able to create join tokens.
Also, because of this new logic, kubeconfig reconciliation should be done before machine creation.
Tested manually with AWS CAPI infrastructure provider.
Fix #795
The logic is simple: we check
Cluster.status.failureDomains
field and, if there are any, select the less used one and add it to the machine spec.But it takes some time for the infrastructure controller to publish failure domains, so the reconciliation logic is a bit reordered: we wait for the first controller to start before creating other ones. It should not slow down the overall process of provisioning since we wait for the first controller anyway to be able to create join tokens. Also, because of this new logic, kubeconfig reconciliation should be done before machine creation.
Tested manually with AWS CAPI infrastructure provider.