Skip to content

check that MachineDeployments are ready

Thomas Morin requested to merge cluster-healthchecks into main

Closes #630 (closed)

This MR adds a 'cluster-ready' unit, whose state will reflect the readiness of all key resources of the 'cluster' unit, including MachineDeployments. Without any unit with a healtchCheck including the MachineDeployments, there was the possibility of completing a deployment despite a failure to deploy MDs.

The initial idea was to extend the healthChecks of the cluster unit to include all MachineDeployments of the cluster.

This wasn't possible because, in the case of kubeadm:

  • we deploy the CNI with a unit that depends on cluster
  • MDs can't become ready if the CNI is not ready (this point isn't specific to kubeadm)
  • if the cluster unit readiness depends on the MD readiness, we have a dependency deadlock

To preserve readability the generation of these health checks is moved to a separate file.

Additionally, I took the opportunity of this rewrite to also include the INFRACluster object in the health checks.

Edited by Thomas Morin

Merge request reports