-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add support for copy/paste, export/import of K/V store folders in Consul native UI #1593
Comments
HI @quickwind thanks for opening an issue. Something like https://github.com/Cimpress-MCP/git2consul is probably a better way to go for this use case. We are thinking of adding a multi-KV API, but we don't have plans to add that to the UI at this time. |
Since this shows up on google, and since I've spent the last 3 hours trying to accomplish a recursive copy of a KV directory, I'll post my terrible bash script here: curl http://consul.mycompany.com/v1/kv/$FROM\?recurse 2>/dev/null |
jq -r '.[] | [.Key, .Value] | join(" ")' |
while read line; do
KEY=$(echo $line | awk '{print $1}' | sed "s/$FROM/$TO/")
VAL=$(echo $line | awk '{print $2}' | base64 --decode)
curl -XPUT -d "$VAL" "http://consul.mycompany.com/v1/kv/$KEY"
echo
done; Set Caveat: Hope this helps someone. |
Is there a way to have consul load key/value from /etc/consul.d/somefile.json, similar how it can load service config ? |
@jsr88f there's currently no way to statically configure keys similar to service definitions. Take a look at git2consul referenced above - it can load KV data based on input files. |
hey guys i have written an application that is basically a tree for consul kv store which support cut, copy, paste, delete , create functions, check it out and let me know if it helps |
@vagharsh honestly I don't have enough will to configure apache + php, but it looks very nice. |
you could use the docker ready-made docker container and not configure anything. |
Hi,
We are using Consul extensively in our project, including using it for our service centralized configuration management via Consul K/V store. We don't yet developed our own UI for configuration management but just use Consul embedded UI for configuration changes. We found it is cumbersome to add the K/V pairs one by one, especially we are separating the services' configuration in different folders.
It would be really great if Consul UI could support copy and paste a whole directory to a new directory (and even can select the keys to copy over), and also export/import the key-value pairs into/from a file.
The text was updated successfully, but these errors were encountered: