Ok, that's interesting: when using the wildcard '*' it works just fine with no TLS options at all, but when using an explicit HostSNI Traefik complains about the lack of TLS option. For instance (using file provider):
tcp:
routers:
system-db:
entrypoints:
- "postgres"
rule: "HostSNI(`system-db.example.com`)"
service: "system-db"
tls: {}
gnucash-db:
entrypoints:
- "postgres"
rule: "HostSNI(`*`)"
service: "gnucash-db"
services:
system-db:
loadBalancer:
servers:
- address: "10.0.0.33:8086"
gnucash-db:
loadBalancer:
servers:
- address: "10.0.0.33:8085"
The above just works and Traefik's monitor dashboard correctly states the first route (system-db) has TLS enabled while the second (gnucash-db) is non-TLS. However, if I change the second to use "HostSNI(gnucash-db.example.com
)", instead of the wildcard, I get the following error:
invalid rule: "HostSNI(
gnucash-db.example.com
)" , has HostSNI matcher, but no TLS on router
Why is TLS enforced in such cases?