Skip to content

Dependent Resource Standalone Building Blocks #887

Closed
@csviri

Description

@csviri

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions