This commit is contained in:
Piotr Biernat 2024-07-20 14:42:16 +02:00
parent 99957861dc
commit 31ce7fc48e

View File

@ -17,6 +17,7 @@ type Service struct {
appID string appID string
domain string domain string
pathPrefix string pathPrefix string
tls bool
port int port int
ttl time.Duration ttl time.Duration
client *consul.Client client *consul.Client
@ -37,6 +38,7 @@ func NewService(servAddr, id, name, useDomainOverIp, addr, domain, pathPrefix st
s.appID = id s.appID = id
s.domain = domain s.domain = domain
s.pathPrefix = pathPrefix s.pathPrefix = pathPrefix
s.tls = true // FIXME add arg
s.port = appPort s.port = appPort
s.ttl = time.Second * 10 s.ttl = time.Second * 10
@ -215,8 +217,8 @@ func (s *Service) getTags() []string {
"traefik.http.services." + s.Name + ".loadbalancer.healthcheck.interval=1s", "traefik.http.services." + s.Name + ".loadbalancer.healthcheck.interval=1s",
"traefik.http.services." + s.Name + ".loadbalancer.healthcheck.timeout=1s", "traefik.http.services." + s.Name + ".loadbalancer.healthcheck.timeout=1s",
"traefik.http.services." + s.Name + ".loadbalancer.healthcheck.path=/health", "traefik.http.services." + s.Name + ".loadbalancer.healthcheck.path=/health",
"traefik.tls.certificates.certfile=/certs/client.cert", "traefik.tls.certificates.certfile=certs/client.cert",
"traefik.tls.certificates.keyfile=/certs/client.key", "traefik.tls.certificates.keyfile=certs/client.key",
} }
return tags return tags