Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [config-dev] [External] : Re: Meta configuration
  • From: Tomas Langer <tomas.langer@xxxxxxxxxx>
  • Date: Thu, 19 Aug 2021 14:24:57 +0000
  • Accept-language: cs-CZ, en-US
  • Arc-authentication-results: i=1; 1; spf=pass; dmarc=pass action=none; dkim=pass; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B07nFzgElL9LRvbb65JjItPziK60GdbYo12Gc/GKB/4=; b=Y13kz93dpv2d6leqYCmPM7SAu/xsBNQc2LzpI2zY5GkIB8PLQ/M3x+M7Gi9hmrawVdtKI25IbAoyvZSps7X7ioimzaWReS/UTjGOQwpDi3aHWPcHspgl4olbAD5jg2YqNpnE3GZEGzK4zA0GWRnJdj1cfNupzwYj14gjESjp6R00cR3+fhcLWkpz0fmMzE0mKDGK7mXfFMQ51buQW1E999RN/oQDFi3+nXHDwoSbZ1x2nzRjTpX+l8M5C1QBh/2Lb1F5HFT7+jEGz/S0kID1wlgHf50jr3X/pXQQ9OaW8Dzk84SM0y+MBXGedduOKJDzCUPsQc2wpuMPXkHoQ6ZcdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=hW/20LTrZrqb/8QvTaA7PPb6/DVAad/hZXFUig5kRxHnKQ4XHNklmJzvu6a5sZ7HvFHn6b7i+Pq7UwE2EhMQQy4CsFaB/SHWy7D6wcU9Sb65Llf0gH19XRoh2yQZ/0+NRA8HgqWLVwX/P3pEWu1B+p+cFP4m5FM+QHjxbH6s0i5y1cn1KUK59ZzoKKP9DLZZ7Z+ignvKBMoQAoC/+4qyqP2+nEeBT6mY0sVjg8ynuntBdrHfEavLNzFG4FFqeaDIOH2higvR1QbqaaKBKzA2nEP/5wFBTo68/31z4zPZ/E/t81psO0e+ve3DJpPyDYoe3mwRMB5gqkbPiYJrMn+Qtw==
  • Delivered-to: config-dev@xxxxxxxxxxx
  • List-archive: <>
  • List-help: <>
  • List-subscribe: <>, <>
  • List-unsubscribe: <>, <>
  • Thread-index: AQHXk21rAEwudFQON0KkMCTU7bD7mat60GgAgAAUtYA=
  • Thread-topic: [External] : Re: [config-dev] Meta configuration

YAML is not needed, can be JSON, HOCON, XML. It just needs to support ordered lists.
This could even be properties, though the approach is more complicated there.


On 19 Aug 2021, at 15:10, Mark Struberg <struberg@xxxxxxxxxx> wrote:

nice feature. Except the yaml ;)


Am 17.08.2021 um 15:40 schrieb Tomas Langer <tomas.langer@xxxxxxxxxx>:

As I promised on the weekly call, here is the example of meta-configuration we use for MP Config (and also the one we use for our config):

This configuration is based on the current MP API for setting up Config:
YAML structure (as it contains ordered arrays) - could be handled by properties (if indexing is used), json etc.

This is a bit limited by the fact that parsers are bound to the source, so a combination of
type + source must be defined (e.g. both properties and YAML source must support classpath, files and URL)

profile: "test"
add-discovered-converters: true
add-discovered-sources: false
add-default-sources: false
- type: "system-properties"
- type: "environment-variables"
- type: "yaml"
path: application.yaml"
- type: "yaml"
optional: true
classpath: "application.yaml"
- type: "properties"
classpath: "META-INF/"

The default location could be META-INF/meta-config.yaml, which can be overridden at runtime using environment variable or system property (such as -Djakarta.config.meta-config=/etc/conifg/meta-config.yaml)

The following structure could be used if we support independent parsers (taken from Helidon Config):

Supported types (could be required by the spec):
- system-properties
- environment-variables
- classpath (requires resource property)
- file (requires path property)
- url (requires url property)
- inlined (configuration data is part of the meta config itself - useful for testing)
Other types that could be supported (this is extensible through service loader, so anything can be done):
- directory (such as each file in the directory is a configuration file prefixed with the file name)
- git (specific file in a git repository)
- etcd

- type: "file"
path: "conf/dev.yaml"
optional: true
- type: "classpath"
multi-source: true # Can yield more than one independent config source
resource: "META-INF/"

config-dev mailing list
To unsubscribe from this list, visit

config-dev mailing list
To unsubscribe from this list, visit;!!ACWV5N9M2RV99hQ!bDs_79MqfdMrXf3S_fWwwRfO2tsHSMT3qdKSthQhaUOkLesG08ekYqnRh5IfdpcWqg$

Back to the top