You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config:=&consul.Config{
Address: cfg.Host,
Token: cfg.ACLToken.String(),
Scheme: "http",
Transport: cleanhttp.DefaultPooledTransport(),
}
client, err:=consul.NewClient(config)
// not nice, but should work I guess :)config.HttpClient.Timeout=cfg.HTTPClientTimeout
The text was updated successfully, but these errors were encountered:
Just wanted to ping on this issue as we are now also securing access to Consul and this is the only blocker we have for completely disabling HTTP on Consul.
Hi,
I'm currently trying to setup loki with consul.
As you use the
consul.NewClient
but pass in a custom httpclientConsul ignores its environment variables (
CONSUL_CACERT
,CONSUL_CLIENT_CERT
,CONSUL_CLIENT_KEY
) that point to the TLS parts https://github.com/hashicorp/consul/blob/main/api/api.go#L706It looks like the only reason that you pass in a custom client is to use the clean http transport and the timeout.
the
transport
could be passed in seperatly https://github.com/hashicorp/consul/blob/main/api/api.go#L678for the timeout you could do this afterwards
So instead of
Something like this:
The text was updated successfully, but these errors were encountered: