Draft: let cluster-maxunavailable work with CAPI 1.12 CP status

Closes sylva-projects/sylva-core#3711

💡 note that this MR is not needed if we merge !123 (merged) first

This MR aims at making the cluster-maxunavailable controller able to read fiels that are present, and hence not be tied to fields that exist only in CP apiVersions of CAPI <= 1.10.

This is needed for sylva-projects/sylva-core!5900

Before this MR, the controller relies on CP.status.updatedReplicas, which isn't always present in the status of newer apiVersions of the CP resources.

After this MR, the controller:

  • tries to use the MachinesUpToDate status.conditions
  • or falls back to upToDateReplicas
  • or falls back to updatedReplicas (to keep compatibility with CAPI 1.10 and make it easy to introduce this evolution of the controller without any dependency deadlock with sylva-projects/sylva-core!5900)
Edited by Thomas Morin

Merge request reports

Loading