diff --git a/extensions/kubernetes-service-binding/runtime/src/main/java/io/quarkus/kubernetes/service/binding/runtime/DatasourceServiceBindingConfigSourceFactory.java b/extensions/kubernetes-service-binding/runtime/src/main/java/io/quarkus/kubernetes/service/binding/runtime/DatasourceServiceBindingConfigSourceFactory.java index 055d10de9d221..26f6f31dd35ef 100644 --- a/extensions/kubernetes-service-binding/runtime/src/main/java/io/quarkus/kubernetes/service/binding/runtime/DatasourceServiceBindingConfigSourceFactory.java +++ b/extensions/kubernetes-service-binding/runtime/src/main/java/io/quarkus/kubernetes/service/binding/runtime/DatasourceServiceBindingConfigSourceFactory.java @@ -47,9 +47,14 @@ private Map getServiceBindingProperties() { log.debugf("Property 'password' was not found for datasource of type %s", serviceBinding.getType()); } - String url = bindingProperties.get("jdbc-url"); - if (url != null) { - properties.put(urlPropertyName, url); + String jdbcURL = bindingProperties.get("jdbc-url"); + if (jdbcURL != null) { + properties.put(urlPropertyName, jdbcURL); + return properties; + } + String uri = bindingProperties.get("uri"); + if (uri != null) { + properties.put(urlPropertyName, uri); return properties; } diff --git a/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/database b/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/database deleted file mode 100644 index 39cd31f5ffa44..0000000000000 --- a/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/database +++ /dev/null @@ -1 +0,0 @@ -quarkus_test diff --git a/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/host b/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/host deleted file mode 100644 index 2fbb50c4a8dc7..0000000000000 --- a/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/host +++ /dev/null @@ -1 +0,0 @@ -localhost diff --git a/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/port b/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/port deleted file mode 100644 index 7e30bed39582f..0000000000000 --- a/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/port +++ /dev/null @@ -1 +0,0 @@ -5431 diff --git a/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/uri b/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/uri new file mode 100644 index 0000000000000..02dca2d9bc469 --- /dev/null +++ b/integration-tests/kubernetes-service-binding-jdbc/src/test/resources/k8s-sb/fruit-db/uri @@ -0,0 +1 @@ +jdbc:postgresql://localhost:5431/quarkus_test diff --git a/integration-tests/kubernetes/quarkus-standard-way/src/test/resources/kubernetes-with-auto-postgres-binding.properties b/integration-tests/kubernetes/quarkus-standard-way/src/test/resources/kubernetes-with-auto-postgres-binding.properties index 3f62f1265363d..ee2a4ec049780 100644 --- a/integration-tests/kubernetes/quarkus-standard-way/src/test/resources/kubernetes-with-auto-postgres-binding.properties +++ b/integration-tests/kubernetes/quarkus-standard-way/src/test/resources/kubernetes-with-auto-postgres-binding.properties @@ -1 +1 @@ -quarkus.datasource.db-kind=postgresql \ No newline at end of file +quarkus.datasource.db-kind=postgresql