From 99ac0a83c656ba4aa6beac6f490109646f2c8351 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Sun, 2 Jul 2023 23:03:05 +0200 Subject: [PATCH] consul register as sidecar_service --- consul/discovery.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consul/discovery.go b/consul/discovery.go index 62fc417..63c0be1 100644 --- a/consul/discovery.go +++ b/consul/discovery.go @@ -71,7 +71,11 @@ func (s *Service) Register() error { Address: s.Address, Port: s.port, Tags: s.getTags(), - Connect: &consul.AgentServiceConnect{SidecarService: &consul.AgentServiceRegistration{}}, + Connect: &consul.AgentServiceConnect{ + SidecarService: &consul.AgentServiceRegistration{ + Port: s.port, + } + }, Check: &consul.AgentServiceCheck{ TTL: s.ttl.String(), Status: "passing",