I can use environment/system variable placeholders in Optimize config

XMLWordPrintable

    • Type: Feature Request
    • Resolution: Done
    • Priority: L3 - Default
    • 2.4.0
    • Affects Version/s: None
    • Component/s: backend

      Context:
      Currently, I always have to hardcode the values for the Optimize configuration. However, sometimes the values are configured in evironment variables to set those configurations once and then they can be reused everywhere.

      AT:

      • configuration values which are set as environment variables are automatically being resolved, when the respective environment variables exist, otherwise startup fails indicating which variable is missing
      • the following types of variables can be resolved/are supported as a config property value using a placeholder:
        • OS environment variables
        • java system properties
      • the order to resolve the value of a configuration property is:
        1. java system properties, e.g. -DAUTH_TOKEN_LIFEMIN=5 with the config.yaml containing {{ auth.token.lifeMin: ${AUTH_TOKEN_LIFEMIN} }}
        2. OS Environment Variables, e.g. AUTH_TOKEN_LIFEMIN=5 with the config.yaml containing {{ auth.token.lifeMin: ${AUTH_TOKEN_LIFEMIN} }}
        3. yaml property values, e.g. auth.token.lifeMin:5
      • the placeholder format used in property values is ${<NAME>}, e.g. ${AUTH_TOKEN_LIFEMIN}
      • this behavior is documented in the technical guide of Optimize

            Assignee:
            Unassigned
            Reporter:
            Johannes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: