-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Set quarkus.datasource.db-kind property in PostgreSql Service Binding #14328
Conversation
…tgreSqlServiceBindingConverter
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Actually, I remember why this was not done in the first place and why it's wrong.
cc @gsmet |
I think the only thing you can do is check the build time value and throw an error if it's not consistent. |
I don't think that provides much value TBH |
I am pretty sure you don't need the runtime properties (like the URL, the username etc.) set, but I could be mistaken and maybe you need some dummy values set |
@geoand gotcha. I see two ways of solving this: 1] Take 2] Read the Service Bindings at build time as well as at runtime If you'd like I can do an initial implementation |
Unfortunately this is not an option: Quarkus needs to know a lot of stuff at buid time
But if you do this, properties won't be available at runtime, no? I might have missed this, but what is the original problem you are trying to solve? |
@geoand I was thinking of adding the kubernetes service binding as a config source at build time too. That way the user only has to use the service binding for a default datasource to be created and doesn't have to add something else to his config or command line. In our case, the user has to set quarkus.datasource.db-kind correctly. I think this would make the user experience better. Hope this makes sense, let me know what you think thanks ! |
Ah, now I think I understand. So you basically want the following: When a user has the I think that it's a good idea. @gsmet how does that sounds to you? |
@geoand exactly! Maybe if there are several datasources configured by service bindings then set the datasource name to the servicebinding name or something (but keeping a default datasource in simple use is nice to have IMO). Thanks ! |
Currently we are not implementing multiple database resources - that is a next thing we need to look into |
…rviceBindingConverter
Fixes #14327
Thanks !