Currently we expose our reconciler structs FoundationDBClusterReconciler, FoundationDBBackupReconciler and FoundationDBRestoreReconciler with the drawback that users might customise them and require a stable interface/struct. Instead of exposing the struct we should expose an Interface that only exposes the fields that should be customisable e.g.
type FoundationDBClusterReconcilerOpts struct {
PodLifecycleManager PodLifecycleManager
}
This new FoundationDBClusterReconcilerOpts will then be passed to the setup method and the setup logic will create the internal reconcilers. That brings the benefit that we can change the underlying reconciler structs without breaking any external dependencies and only offer the required surface for customisation.
Currently we expose our reconciler structs
FoundationDBClusterReconciler
,FoundationDBBackupReconciler
andFoundationDBRestoreReconciler
with the drawback that users might customise them and require a stable interface/struct. Instead of exposing the struct we should expose an Interface that only exposes the fields that should be customisable e.g.This new
FoundationDBClusterReconcilerOpts
will then be passed to the setup method and the setup logic will create the internal reconcilers. That brings the benefit that we can change the underlying reconciler structs without breaking any external dependencies and only offer the required surface for customisation.