Skip to content

feat: allow reconcilers to override their own configuration #2779

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

metacosm
Copy link
Collaborator

Signed-off-by: Chris Laprun [email protected]

@metacosm metacosm self-assigned this Apr 30, 2025
@metacosm metacosm requested review from csviri and xstefank April 30, 2025 14:42
Copy link
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the use case for this change?

Would be good to document it at least as Javadoc on the interface

@metacosm
Copy link
Collaborator Author

metacosm commented May 3, 2025

What is the use case for this change?

This allows for Reconciler implementations to customize their configuration based on runtime information before being registered in situations where programmatic configuration via manually created ControllerConfigurationOverrider might not be easy or straightforward, like the Quarkus extension (and could potentially simplify the Spring Boot starter as well).

@metacosm metacosm force-pushed the configure-controller branch from dafb814 to fa23191 Compare May 3, 2025 18:17
@goldmann
Copy link

goldmann commented May 5, 2025

I like this approach. It will definitely make my life easier where I have many label selectors that I'm adjusting based on two sources: a Map in the code and env variables set at deployment time. And this multiplied by a number of controllers.

Copy link
Collaborator

@xstefank xstefank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I don't understand is why it's not applied the first time getConfigurationFor is called.

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

Successfully merging this pull request may close these issues.

4 participants