register fix

This commit is contained in:
Piotr Biernat 2022-12-01 19:02:46 +01:00
parent c85d881954
commit 1566f31f42

View File

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"log" "log"
"net/http" "net/http"
"strconv"
"time" "time"
consul "github.com/hashicorp/consul/api" consul "github.com/hashicorp/consul/api"
@ -120,18 +119,18 @@ func (s *Service) getTags() []string {
"traefik.enable=true", "traefik.enable=true",
"traefik.http.routers." + s.Name + ".rule=Host(`" + s.Address + "`)", "traefik.http.routers." + s.Name + ".rule=Host(`" + s.Address + "`)",
"traefik.http.routers." + s.Name + ".entryPoints=https", "traefik.http.routers." + s.Name + ".entryPoints=https",
"traefik.http.routers." + s.Name + ".service=" + s.Name, // "traefik.http.routers." + s.Name + ".tls=true",
"traefik.http.routers." + s.Name + ".middlewares=compress,requestid", // "traefik.http.routers." + s.Name + ".service=" + s.Name,
"traefik.http.routers." + s.Name + ".tls=true", // "traefik.http.services." + s.Name + ".loadbalancer.server.scheme=http",
"traefik.http.services." + s.Name + ".loadbalancer.server.scheme=http", // "traefik.http.services." + s.Name + ".loadbalancer.server.port=" + strconv.Itoa(s.Port),
"traefik.http.services." + s.Name + ".loadbalancer.server.port=" + strconv.Itoa(s.Port), // "traefik.http.services." + s.Name + ".loadbalancer.passhostheader=false",
"traefik.http.services." + s.Name + ".loadbalancer.passhostheader=false",
// "traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + "=" + bFullAddr, // "traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + "=" + bFullAddr,
// "traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + ".url=" + bFullAddr, // "traefik.http.services." + s.Name + ".loadbalancer.servers." + fullName + ".url=" + bFullAddr,
"traefik.http.middlewares.compress.compress=true", // "traefik.http.services." + s.Name + ".loadbalancer.healthcheck.path=/health",
"traefik.http.middlewares.requestid.plugin.requestid.headerName=X-Request-ID", // "traefik.http.services." + s.Name + ".loadbalancer.healthcheck.interval=10s",
// "traefik.http.services." + fullName + ".loadbalancer.healthcheck.path=/health", // "traefik.http.routers." + s.Name + ".middlewares=compress,requestid",
// "traefik.http.services." + fullName + ".loadbalancer.healthcheck.interval=10s", // "traefik.http.middlewares.compress.compress=true",
// "traefik.http.middlewares.requestid.plugin.requestid.headerName=X-Request-ID",
} }
return tags return tags