Move the rule to variables.yml
This commit is contained in:
parent
bfcc7ead9d
commit
bcd825b82c
|
@ -22,8 +22,6 @@ job "[[ .instance ]]" {
|
|||
[[ template "common/connect" $c ]]
|
||||
|
||||
tags = [
|
||||
# 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/`)",
|
||||
[[ template "common/traefik_tags" $c ]]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -45,12 +45,11 @@ job "acme-to-vault" {
|
|||
|
||||
|
||||
tags = [
|
||||
# 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.enable=true",
|
||||
"traefik.http.routers.acme-to-vault.entrypoints=http,https",
|
||||
"traefik.http.routers.acme-to-vault.priority=2000",
|
||||
"traefik.http.routers.acme-to-vault.rule=Host(`fake-acme-host`) || PathPrefix(`/.well-known/acme-challenge/`)",
|
||||
"traefik.http.routers.acme-to-vault.middlewares=rate-limit-std@file,inflight-std@file,hsts@file",
|
||||
|
||||
]
|
||||
|
|
|
@ -29,6 +29,9 @@ acme:
|
|||
LEGO_DISABLE_CNAME_SUPPORT: true
|
||||
|
||||
traefik:
|
||||
# We use a fakse host rule (which will never match) so Traefik wont complain about a rule with no Host
|
||||
rule: Host(`fake-acme-host`) || PathPrefix(`/.well-known/acme-challenge/`)
|
||||
|
||||
# List of entrypoints where the http-01 challenges will be exposed
|
||||
entrypoints:
|
||||
- http
|
||||
|
|
Loading…
Reference in New Issue