-
Notifications
You must be signed in to change notification settings - Fork 236
Closed
Description
This issue is about a design aspect of DependentResources. See other issues by related labels.
The goal in nutshell, is that a DependentResource should be implementation should be usable independently of the controller internal. So something like this should be doable:
@ControllerConfiguration
public class MyReconciler
implements Reconciler<MyResource>,
EventSourceInitializer<MyResource> {
// this will be probably KubernetesDependentResource or similar
DependentResource<Deployment> dependentResource;
public MySQLSchemaReconciler(KubernetesClient client) {
dependentResource = new DependentResource(client, ...)
}
@Override
public List<EventSource> prepareEventSources(
return List.of(dependentResource.initEventSource())
}
@Override
public UpdateControl<MyResource> reconcile(MyResource schema, Context context) {
dependentResource.reconcile(schema,context)
}Maybe we should differentiate at the end between DependentResource and ManagedDependentResource.