Enable TLS for Consul Connect TCP services
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
4acec60e72
commit
8d0979bfd0
2 changed files with 2 additions and 0 deletions
|
@ -229,6 +229,7 @@ func (p *Provider) addServerTCP(item itemData, loadBalancer *dynamic.TCPServersL
|
|||
|
||||
if item.ExtraConf.ConsulCatalog.Connect {
|
||||
loadBalancer.ServersTransport = itemServersTransportKey(item)
|
||||
loadBalancer.Servers[0].TLS = true
|
||||
}
|
||||
|
||||
loadBalancer.Servers[0].Address = net.JoinHostPort(item.Address, port)
|
||||
|
|
|
@ -2245,6 +2245,7 @@ func Test_buildConfiguration(t *testing.T) {
|
|||
Servers: []dynamic.TCPServer{
|
||||
{
|
||||
Address: "127.0.0.1:80",
|
||||
TLS: true,
|
||||
},
|
||||
},
|
||||
ServersTransport: "tls-ns-dc1-Test",
|
||||
|
|
Loading…
Reference in a new issue