Closed cmoulliard closed 1 year ago
I don't see how the quarkus application is going to read url
and use it to connect to postgres.
This can be done with the following ways:
url
.QUARKUS_DATASOURCE_JDBC_URL
.quarkus-kubernetes-service-binging
.The service binding approach can be achived:
For the service binding scenarios: https://developers.redhat.com/articles/2021/12/22/how-use-quarkus-service-binding-operator
- Semi automatic: Using something like the SBO.
Primaza is doing this job and mount the secret created within a Deployment. See here. Is it correct what we do ? @iocanel
The approach is not wrong, but it's incomplete. Unless, the secret is strucutred in a way that can be understood by quarkus it won't work. Quarkus can understand properties like: QUARKUS_DATASOURCE_JDBC_URL
or if you need something not coupled to Quarkus, a file system strcuture similar to what is used in the service binding spec.
Given, that using environment variables for binding is becoming less and less popular I would focus on the later approach.
on the later approach.
You mean on a file system strcuture similar to what is used in the service binding spec.
? Example ?
We're using the Quarkus Super Hero workshop as part of the CI and it works fine. I'm closing this issue as whatever the issue was, it's fixed.
Issue
Quarkus super heroes - healthCheck cannot connect to the DB. It
seems
to use the profile accessing "localhost:5432" and not ENV VAR mouted from the secretENV VAR is well mounted within the pod
Are we sure that the name of the URL is what the Service Binding Quarkus extension is looking for ? @aureamunoz @iocanel