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

git2consul is not converting .json file to KV entry in consul #176

Open
ksachdeva11 opened this issue Mar 26, 2018 · 3 comments
Open

git2consul is not converting .json file to KV entry in consul #176

ksachdeva11 opened this issue Mar 26, 2018 · 3 comments

Comments

@ksachdeva11
Copy link

ksachdeva11 commented Mar 26, 2018

My test.json looks something like this :

{
  "url":"http://127.0.0.1:80",
  "web.host1": "xyz.com",
  "web.host2": "abc.com"
}

When I run git2consul, it just blindly puts this value in consul with test.json as key name and the content pasted above as value.

Should it not create a key names like test/url, test/web.host1, test/web.host2 and put values like http://127.0.0.1:80, xyz.com, abc.com under those key names?

Am I doing something wrong?

Attached consul screenshot below :
screen shot 2018-03-26 at 4 10 01 pm

Thanks!

@ksachdeva11
Copy link
Author

Ok, I was able to get it working by setting expand_keys as true in the config. But the path looks like sample_configuration/master/test.json/url.

Is there a way we can get rid of .json from the above path ?

@stevenscg
Copy link
Contributor

@ksachdeva11 Try adding ignore_file_extension: true to your configuration.

@joydeep281992
Copy link

@ksachdeva11 I am facing the initial problem you have described. I am not sure where you are adding the expand_keys parameter. I tried as bellow:
{
"url":"http://127.0.0.1:80",
"web.host1": "xyz.com",
"web.host2": "abc.com",
"ignore_file_extension": "true",
"expand_keys": "true"
}
It added the entire json to the KV as your initial problem described. Can you please help me troubleshoot this ?

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

3 participants