fabio icon indicating copy to clipboard operation
fabio copied to clipboard

Allow Consul api to set default config for addr

Open pingiun opened this issue 3 years ago • 4 comments

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

pingiun avatar May 15 '21 19:05 pingiun

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 15 '21 19:05 CLAassistant

@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.

nathanejohnson avatar Jul 15 '22 01:07 nathanejohnson

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

pingiun avatar Jul 15 '22 11:07 pingiun

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.

nathanejohnson avatar Jul 15 '22 15:07 nathanejohnson