[backport-1.1 / sylva-1.4/1.5] backport cluster-maxunavailable refactoring

This is meant to address sylva-projects/sylva-core#3342 and sylva-projects/sylva-core#3341, which use the same branch of misc-controller-suite.

The main backport is !99 (merged) but the one in !123 (merged) is necessary as well, plus two cleanups without which the patch don't apply cleanly.

This is a backport of !101 (merged), !99 (merged)!, !110 (merged), !123 (merged):

  • cluster-maxunavailable: remove unused requeueDelayLastActionTooRecent constant
  • simplify getCPInfos
  • cluster-maxunavailable: refactor to directly check Machines status
  • remove heuristic safeguard to avoid action following one another too closely in time
  • use a direct client (bypassing informer cache) to get fresh information on Machines status
  • improve log/event messages
  • modify "make run" to have it enable our controllers
  • simplify code related to list of candidate Machines
  • handle unhealthy deleting machine
  • rewrite with everything as cluster-api collections.Filters

This MR also pins go-sbom image to avoid the problem described at sylva-projects/sylva-core#3794.

Tested in:

Edited by Thomas Morin

Merge request reports

Loading