controller-runtime icon indicating copy to clipboard operation
controller-runtime copied to clipboard

⚠ Move arguments from Watch() & Start() to Source objects

Open inteon opened this issue 2 years ago • 5 comments

⚠️ depends on https://github.com/kubernetes-sigs/controller-runtime/pull/2686

This PR removes the argument pass-through that happens when starting a Source watch. Now, the eventhandler is passed directly to the Source constructor function. Additionally, the predicates are now passed to the handler.WithPredicates which returns a "filtered handler".

This UX change makes the setup of Sources more intuitive, makes it much easier to create a custom Source and makes Sources easier to reason about.

inteon avatar May 10 '23 12:05 inteon

@inteon Are you still interested in this PR?

sbueringer avatar Jan 03 '24 16:01 sbueringer

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: inteon Once this PR has been reviewed and has the lgtm label, please assign fillzpp for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jan 06 '24 11:01 k8s-ci-robot

@sbueringer I rebased the PR.

inteon avatar Jan 06 '24 12:01 inteon

@inteon: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-controller-runtime-apidiff 98944019ace34b2d4f3a54d2abad5d6cb85ee258 link false /test pull-controller-runtime-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

k8s-ci-robot avatar Feb 13 '24 22:02 k8s-ci-robot

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 26 '24 18:03 k8s-ci-robot