-
Notifications
You must be signed in to change notification settings - Fork 218
Possibility to create DependentResources via custom Factory #1855
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
Comments
Hi @nsoubelet , after our initial discussion, was thinking that, this should be actually possible with custom configurations, this is not a very good documented feature, will add docs and sample integration test. But it should be possible as shown here: Define a custom configuration for the dependent resource: You can override the config values as shown here: Is this good enough for you? |
Hi @csviri In the meantime, what I did is what you suggested yesterday which is use the standalone approach and call DR's What I suggested in the ticket is having different strategies for DR instantiation, which could be the base for having delegates that look up within a context, for example. I guess that could be easier to read and follow the code and to adapt to different frameworks. Btw, nice lib guys! I love it, great work :) |
Yes this is definetelly we should look into it. thank you! cc @metacosm |
I'm not sure about all that was discussed but the Quarkus extension already makes use of the |
Hi @metacosm, I was not aware. |
That said, it might be beneficial to maybe clean this up a little bit and make it part of the documented API since this should indeed help for framework integration. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Hello,
I have a pretty specific use case for which I would like to have a
KubernetesDependentResource
with a constructor over which I need to pass certain parameters.I noticed there is a
DependentResourceFactory
interface but seems to be used internally and not meant to be specified by implementors (Controllers).This is what I need to achieve:
I think that implementation should not be difficult, a possible flexible way, which may be the base for bigger features like injection in Spring or any other Jakarta-CDI-based framework like Quarkus, is by recognizing dynamically whether a
@Dependent
type is an actualDependentResource
or a delegate (factory).In that approach, we could decide in method instantiateAndConfigureIfNeeded whether create the instance locally or delegate it.
Could be something like:
Hope I made myself clear, if not please comment!
Thanks in advanced
The text was updated successfully, but these errors were encountered: