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

ControllerManagedBy builder unconditionally overrides options.Reconciler value #1021

Closed
Danil-Grigorev opened this issue Jun 29, 2020 · 0 comments · Fixed by #1022
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Danil-Grigorev
Copy link
Member

/kind bug

ctrlOptions.Reconciler = r

is always overriding options.Reconciler value, explicitly set in

// WithOptions overrides the controller options use in doController. Defaults to empty.
func (blder *Builder) WithOptions(options controller.Options) *Builder {
blder.ctrlOptions = options
return blder
}

This complicates exclusive unit testing for SetupWithManager method, and forces to use older controller.Watch implementation to pass a mocked Reconcile method, or surfacing unfinished builder.Builder structure to achieve the same goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants