Ilya Korol created IGNITE-26948:
-----------------------------------
Summary: Add support for sys/env variables interpolation in HOCON
configuration
Key: IGNITE-26948
URL: https://issues.apache.org/jira/browse/IGNITE-26948
Project: Ignite
Issue Type: Improvement
Components: configuration ai3
Reporter: Ilya Korol
In pretty much any kinds of deployment it's natural wish to populate some
configuration parameters (e.g. {{network.port }}or {{{}providers.password{}}})
from environment instead of hardcoding them directly into config file.
h1. Proposal
For constructions like {{${VAR_NAME}}} add lookup of {{VAR_NAME}} in JVM
properties or environment variables.
As an alternative syntax we can also consider Log4j2:
{code:java}
${sys:var_name} // for JVM props
${env:var_name} // for environment vars{code}
Ideally Ignite should also support syntax like {{${var_name:-default_val}}} for
instance:
{code:java}
network {
port: ${NODE_PORT:-3344}
}{code}
Additional requirements:
1. Should be switchable by some JVM property, like:
{{IGNITE_ENABLE_CFG_VARS_INTERPOLATION (dflt = false)}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)