snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Support for Service Binding Specification to pick up external service configuration "automagically" #226

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

Description The k8s service binding specification has a notion of "application projection" which defines how directory with files gets used to map a configuration of external services, like a postgres database or a kafka source.

My thinking is that Quarkus should have a way for user to load that configuration to be available in two ways:

1) as raw configuration variables that could be referred in application.properties i.e.

quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=${qurarkus.service-binding.xyz.username}

2) have ability for extensions to provide "magic detectors" (for lack of a better word) that will be consulted to perform a automagic mapping of the external services into quarkus configuration.

These detectors would be service specific, i.e. a PostgresSQLServiceBinding class would based on the always present type map the known settings into quarkus.datasource configs. Similar with a MySQL or whatever known set of services.

Implementation ideas Be based on similar ideas used for other config resources and priorities - just that in this case we are able to do more service specific setup removing need for users always have to manually do #1 option above.


https://github.com/quarkusio/quarkus/issues/13617


$upstream:13617$