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 Consul api to set default config for addr #829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pingiun
Copy link

@pingiun pingiun commented May 15, 2021

As can be seen in https://github.com/hashicorp/consul/blob/91ee7990ccf27ab7fccff746f8df0df65c3c583d/api/api.go#L390 the API also defaults to localhost:8500, however it can also use the environment variable CONSUL_HTTP_ADDR which is useful when fabio is run with nomad.

This change makes sure that the existing default stays working, but it now works better by default in more situations

Related: #773

@CLAassistant
Copy link

CLAassistant commented May 15, 2021

CLA assistant check
All committers have signed the CLA.

@nathanejohnson nathanejohnson modified the milestone: 1.6.1 Jul 15, 2022
@nathanejohnson
Copy link
Member

@pingiun I think this is a good change, sorry this has taken so long to get back to you. But if you can get this rebased against master, i'll try to sneak this in with the next release which will likely happy tomorrow.

As can be seen in https://github.com/hashicorp/consul/blob/91ee7990ccf27ab7fccff746f8df0df65c3c583d/api/api.go#L390 the API also defaults to localhost:8500, however it can also use the environment variable CONSUL_HTTP_ADDR which is useful when fabio is run with nomad.

This change makes sure that the existing default stays working, but it now works better by default in more situations
@pingiun
Copy link
Author

pingiun commented Jul 15, 2022

@nathanejohnson good to hear! I switched from fabio to traefik myself but I'm happy to help out

@nathanejohnson
Copy link
Member

So the config load tests are failing, I will have to postpone this for a bit when I have more time to dig in, but I believe it's in the parseScheme method for parsing the consul address.

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

Successfully merging this pull request may close these issues.

None yet

3 participants