diff --git a/pkg/provider/consulcatalog/config.go b/pkg/provider/consulcatalog/config.go index 14c4fcc87..a45696fd4 100644 --- a/pkg/provider/consulcatalog/config.go +++ b/pkg/provider/consulcatalog/config.go @@ -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) diff --git a/pkg/provider/consulcatalog/config_test.go b/pkg/provider/consulcatalog/config_test.go index d1a606554..972ac3586 100644 --- a/pkg/provider/consulcatalog/config_test.go +++ b/pkg/provider/consulcatalog/config_test.go @@ -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",