docker / libkv

Distributed key/value store abstraction library
Apache License 2.0
853 stars 205 forks source link

Allow to specify consul scheme (only HTTP is allowed at the moment) #152

Open mcapuccini opened 7 years ago

mcapuccini commented 7 years ago

Hello! This fixes https://github.com/docker/libkv/issues/151.

This line https://github.com/docker/libkv/blob/master/store/consul/consul.go#L77 overwrites the setting that I am trying to pass via the environment variable CONSUL_HTTP_SSL to the hashicorp API. This makes impossible to connect to a consul server with HTTPS, and it is causing an issue in Traefik: https://github.com/containous/traefik/issues/1275.

Fixing the scheme to "https" shouldn't be necessary, as the hashicorp API does it by default (https://github.com/hashicorp/consul/blob/8a5164e14aa5464f807eed493c2fb70329ef2135/api/api.go#L216), so I guess you could remove that line.

mcapuccini commented 7 years ago

@GordonTheTurtle done... now I have to understand why the CI fails. From the log it seems like it can't download the consul binary. Any suggestion?

mcapuccini commented 7 years ago

@GordonTheTurtle ... just noticed that you are bot haha

mcapuccini commented 7 years ago

This is going to pass after https://github.com/docker/libkv/pull/154 is merged