Use new traefik_tags template
This commit is contained in:
parent
2d34a301ce
commit
58bbd552a5
|
@ -22,12 +22,9 @@ job "[[ .instance ]]" {
|
|||
[[ template "common/connect" $c ]]
|
||||
|
||||
tags = [
|
||||
"[[ $c.traefik.instance ]].enable=true",
|
||||
# Note : add a fake host in the rule to prevent warnings in Traefik logs
|
||||
"[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].rule=Host(`fake-acme-host`) || PathPrefix(`/.well-known/acme-challenge/`)",
|
||||
"[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].priority=[[ $c.traefik.priority ]]",
|
||||
"[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].entrypoints=[[ join $c.traefik.entrypoints "," ]]",
|
||||
"[[ $c.traefik.instance ]].http.routers.[[ .instance ]][[ .consul.suffix ]].middlewares=[[ template "common/traefik_middlewares" $c ]]"
|
||||
[[ template "common/traefik_tags" $c ]]
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -45,12 +45,14 @@ job "acme-to-vault" {
|
|||
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
# Note : add a fake host in the rule to prevent warnings in Traefik logs
|
||||
"traefik.http.routers.acme-to-vault.rule=Host(`fake-acme-host`) || PathPrefix(`/.well-known/acme-challenge/`)",
|
||||
"traefik.http.routers.acme-to-vault.priority=2000",
|
||||
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.acme-to-vault.entrypoints=http,https",
|
||||
"traefik.http.routers.acme-to-vault.middlewares=rate-limit-std@file,inflight-std@file,security-headers@file,hsts@file"
|
||||
"traefik.http.routers.acme-to-vault.priority=2000",
|
||||
"traefik.http.routers.acme-to-vault.middlewares=rate-limit-std@file,inflight-std@file,security-headers@file,hsts@file",
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ acme:
|
|||
- http
|
||||
- https
|
||||
priority: 2000
|
||||
auto_rule: false
|
||||
|
||||
accounts: []
|
||||
# accounts:
|
||||
|
|
Loading…
Reference in New Issue