hashicorp / hashicorp/consul

Feature request: support hierarchical kv lookup api

Open
#3,617 2 comments 4 reactions 0 assignees View on GitHub
theme/kv theme/operator-usability type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

Consul hierarchical KV structure is a very suitable model to store application configuration parameters in different environment. You can define a property as key/value at one level and re-define it at a lower level to virtually override the higher level one. For example you could have:
```
\dev
k1=v1
app1\
k1=v2
app2\
k2=123
\qa
\prd
```
In the above example property k1 is defined at \dev and \dev\app1. Now I can say the value k1 for app1 is v2, and for app2 the value is still v1 as defined at a higher level in the hierarchy. I would like to be able easily get the value of k1 with one single api call rather than traversing the tree looking for k1 in higher levels. Something like:
GET /kv/dev/app1/k1 to return v2
GET /kv/dev/app2/k1 to return v1
GET /kv/dev/k1 to return v1

When the hierarchy gets deeper and deeper, looking up a property requires more calls to check parent levels. I think if Consul has a built-in support for these kinds of queries it makes life a lot easier.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.