FoundationDB / fdb-kubernetes-operator

A kubernetes operator for FoundationDB
Apache License 2.0
240 stars 83 forks source link

Reduce the exposed surface for our reconciler structs #842

Closed johscheuer closed 2 years ago

johscheuer commented 3 years ago

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.

johscheuer commented 2 years ago

Once https://github.com/FoundationDB/fdb-kubernetes-operator/pull/913 is merged we can move a big chunk of code into our internal package.