Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sub-tree injection in configuration framework #183

Open
urbim opened this issue Nov 13, 2020 · 0 comments
Open

Allow sub-tree injection in configuration framework #183

urbim opened this issue Nov 13, 2020 · 0 comments

Comments

@urbim
Copy link
Member

urbim commented Nov 13, 2020

If __kumuluzee-inject property is defined, inject all configuration from that sub-tree.

The goal is to support something like this:

config.yml:

kumuluzee:
  health:
    checks:
      kafka-health-check:
        __kumuluzee-inject: "kumuluzee.streaming.producer"
        a: 2 # override
        c: 3 # define new

  streaming:
    producer:
      a: 1 # gets overridden
      b: test # defines new
      d:
        e: nested # defines nested

This would create effective configuration:

kumuluzee:
  health:
    checks:
      kafka-health-check:
        a: 2
        b: test
        c: 3
        d:
          e: nested

  streaming:
    producer:
      a: 1
      b: test
      d:
        e: nested

This allows developers to write repeatable configuration only once (DRY) while still allowing overrides to be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant