Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider parametrizing reconcilers to allow wrapping them with custom behaviour #4190

Open
pmalek opened this issue Jun 15, 2023 · 0 comments

Comments

@pmalek
Copy link
Member

pmalek commented Jun 15, 2023

Problem statement

Currently, reconcilers pass themselves to controller.New() through controller.Options, e.g.

// generate the controller object and attach it to the manager and link the reconciler object
c, err := controller.New("gateway-controller", mgr, controller.Options{
Reconciler: r,
LogConstructor: func(_ *reconcile.Request) logr.Logger {
return r.Log
},
CacheSyncTimeout: r.CacheSyncTimeout,
})

This makes it impossible to customize their behaviour, e.g. by counting the number of calls as it was suggested in https://github.com/Kong/kubernetes-ingress-controller/pull/4172/files#r1231167031

This issue tracks the effort to consider and research options to make the reconciler passed to e.g. SetupWithManager() (or other method) customizable so that it could be wrapped to customize its behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant