k0sproject / k0smotron

k0smotron
https://docs.k0smotron.io/
Other
508 stars 48 forks source link

Failure domains support #803

Closed makhov closed 2 weeks ago

makhov commented 3 weeks ago

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.