Skip to content

Consider using generics for the reconcile.Reconciler interface #2221

@alvaroaleman

Description

@alvaroaleman

Most reconcilers reconcile some kubernetes object. Any such reconciler needs to start off with a check if the object still exists and do nothing if not. We could avoid this check by doing it in controller-runtime and adding a new interfaceReconcile[o ctrlclient.Object](context.Context, o)(reconcile.Result, error) that people can use instead of the current one. We can not remove the current one, because not all reconcilers act on k8s objects.

The main challenge here is that there are also reconcilers that do not reconcile a kubernetes object and that need to be able to use some kind of arbitrary key.

/cc @sbueringer @vincepri

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions