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

Any plans to support hierachical values? #28

Open
EugenMayer opened this issue Jun 28, 2016 · 2 comments
Open

Any plans to support hierachical values? #28

EugenMayer opened this issue Jun 28, 2016 · 2 comments

Comments

@EugenMayer
Copy link

EugenMayer commented Jun 28, 2016

Are there any plans to support nested / hierarchical values when fetched form consul?
I am not sure how this is even supported in tiller in general, can i define

defaults:
  global:
    simple: 1
    test:
      something: "value"

and how those values will be accessed in the template, probably

<%= test[:something]%>
<%= simple%>

i cannot really see a reason to not do so. The only issue we have with consul is, that diplomat has a fairly crazy way to deal with nesting, eventhough they support it.

They are return a flat hashmap were keys would look like

result['simple']=>1
result['test/something']=>"value

So its flattened, actually even worse then that, when you ask the KV for KV.get('all/from/here/')
All keys are even prefixed with all/from/here/ .. makes the whole code depenedend on were you found the tree. I am thinking about writing a extension for diplomat to create a proper hashmap - diplomat actually just parses the plain json consul returns - and thats consuls format

Any thoughts on this?

@EugenMayer
Copy link
Author

Just for the notes, of course i now use things like

value = Diplomat::Kv.get('some/nexte/path/to/value')

eventhough this works, it does not respect overlays for global and production and is overall complicated with this all/env overlays and makes those useless ( practical, you only can use all )

@EugenMayer
Copy link
Author

this would actually solve this #45 so convert_to_hash option closes this issue as well

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

No branches or pull requests

1 participant