Compare commits

...

2 Commits

Author SHA1 Message Date
4f3386d548 upgrade to traefik v3 2022-12-10 05:18:44 +01:00
660e58d36a Added deregister_critical_service_after=5s opt 2022-12-07 04:11:20 +01:00

View File

@@ -65,6 +65,7 @@ func (s *Service) Register() error {
Tags: s.getTags(),
Check: &consul.AgentServiceCheck{
TTL: s.ttl.String(),
DeregisterCriticalServiceAfter: "5s",
},
}
@@ -138,7 +139,7 @@ func (s *Service) healthCheck() (bool, error) {
func (s *Service) getTags() []string {
tags := []string{
"traefik.enable=true",
"traefik.http.routers." + s.Name + ".rule=Headers(`X-API-SERVICE`, `" + s.Name + "`)",
"traefik.http.routers." + s.Name + ".rule=Header(`X-API-SERVICE`, `" + s.Name + "`)",
"traefik.http.routers." + s.Name + ".entryPoints=https",
"traefik.http.routers." + s.Name + ".tls=true",
"traefik.http.routers." + s.Name + ".service=" + s.Name,