-
Epic
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
-
MicroProfile Config
-
Empty show more show less
Currently, magnolia.properties are mostly looked-up in paths relative the webapp (WEB-INF/config), which forces them to be packaged within the container, together with the application. Alternatively, most projects use verbose/hard-to-manage environment variables or Java system properties as command args (-Dmagnolia.resources.dir=...) upon container build or entry-point.
We aim to facilitate external configuration, e.g. provided on a volume apart from the container image itself.
We started implementing MicroProfile Config (incubating on 6.3 feature branch), to achieve external configuration—effectively proven as a Kubernetes ConfigMap, mounted on a volume.
Resulting mechanism for customers would look as follows, as Smallrye (MP Config impl) allows, and similar to documented by Thorntail:
Search Paths & Explicit Configuration Files
To externalize configuration, the Java system property of thorntail.config.location or the system environment variable of THORNTAIL_CONFIG_LOCATION may be set to a system-dependent delimited set of paths. Each path is considered in turn, with increasing priority. If a path is a directory, it will be searched for appropriate configuration files matching any activated profiles. If a path is a regular file, it will be loaded, regardless of name or activated profiles.
—https://docs.thorntail.io/4.0.0-SNAPSHOT/#component-config
Name of those properties are smallrye.config.location and SMALLRYE_CONFIG_LOCATION by default; prefix is configurable so we propose magnolia.config.location and MAGNOLIA_CONFIG_LOCATION, respectively.
As a consequence, magnolia.properties should gradually be deprecated. A MP ConfigSource should expose them for backwards compatibility. And/or a MagnoliaConfigurationProperties bridge implementation, powered by MP Config.
Preceding work
MAGNOLIA-8197 Implement bindings to MicroProfile Config API in Magnolia
MAGNOLIA-8196 Design and implement support for complex config mapping via MP Config API
MAGNOLIA-8199 React on externally provided configuration changes at runtime w/out instance redeploy
MAGNOLIA-8194 Enable support for yaml files when reading the config
MAGNOLIA-8198 Error handling for MicroProfile API
MAGNOLIA-8195 Expose MicroProfile config reload trigger via JMX
MAGNOLIA-8163 Add support to Optional<T> for @ConfigProperty and @ConfigProperties
- is related to
-
MGNLLIC-84 License module should parse the license from MicroProfile
- Open