Use of quarkus-agroal with GCP CloudSql #5824
Labels
area/documentation
kind/enhancement
New feature or request
triage/wontfix
This will not be worked on
Description
As of now using quarkus-agroal to connect with GCP is possible but nor documented or trivial.
Implementation ideas
First option is to add com.google.cloud.sql:postgres-socket-factory or com.google.cloud.sql:mysql-socket-factory to the application dependencies and configuring datasource as follow :
Second option would be to add a dedicated options such as use-cloud-sql and cloud-sql-instance to delegate the url forging to the
io.quarkus.agroal.runtime.AbstractDataSourceProducer
class.I don't know if we could arrange some kind of optional maven dependency to the google socket factory jar, to prevent loading unneeded jar.
I tried using both options. You can check the code for agroal extension here (https://github.com/jtama-op/quarkus/commit/eb27113c050b2c98a0ef046a84d366484adf6e21) (though it won't package due to
Dependency convergence error for com.google.http-client:google-http-client-jackson2:1.30.1
)Anyway documenting this would be great as quarkus is great tool for deploying apps on Cloud and GCP beeing one of the top 3 provider.
The text was updated successfully, but these errors were encountered: