quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.38k stars 2.56k forks source link

Load configuration properties from Consul KV folders #16095

Open ivannov opened 3 years ago

ivannov commented 3 years ago

Background

At the moment an application developer load the configuration from Consul's Key Value store using the Quarkus consul-config extension.

You can either obtain a single config property from a list of Consul key/values via:

quarkus.consul-config.raw-value-keys=some-path,another-path

Or you can load a bunch config properties from a Consul key/value that is laid out as a properties file via:

quarkus.consul-config.properties-value-keys=some-path

In both cases the Consul paths should point to an actual key/value and not to a folder in the store

Requirements

Implement a capability to provide a list of Consul KV store folders in the application config, then recursively scan those folders for sub-folders and build config properties from the key/values found.

Build the key of the property as a concatenation of the full path in Consul KV, minus the value of quarkus.consul-config.prefix.

Provide only support for raw values.

sberyozkin commented 3 years ago

Linking to CredentialsProvider just in case