Traefik, yaml format and backticks...

Hi everyone !

I just learned the hardway how important it is to make the difference between ` and ' ...

Tried for 1 whole day to figure out why I got a stupid error in traefik with rule=host(hostname).

While the logs weren't clear about what was raising the error:

error while parsing rule Host('vaultwarden.home.lab'): 1:6: illegal rune literal

I tried alot of different things, from changing the self signed certs, wildcards, adguard DNS rewrite, changing network add some wired traefik rules... To finally compare 2 different yaml files and having that "ahhh..." feeling...

Bit depressing but finally happy to have my own self signed local domain names.

12 points · 7 comments · view on lemmy.world

7 Comments

sqraw@lemmy.ca · 3 pts · 3y (4 replies)

Highly recommended a yaml "linter" :)

amp@kbin.social · 3 pts · 3y (2 replies)

no that is valid yaml in any case, it's just a traeffic specific rule

sqraw@lemmy.ca · 1 pts · 3y

Oh good point.... yaml hard

deepdive@lemmy.world · 1 pts · 3y

Good to know :) ! To be more specific, it's a GO syntax ! See @alxx comment !

deepdive@lemmy.world · 2 pts · 3y

Thanks :)

alxx@lemmy.world · 1 pts · 3y (1 reply)

This is not Traefik's fault though. It's because of String literals in Go.

deepdive@lemmy.world · 2 pts · 3y

Thank you for the insight ! So, I could have used " " instead of ` . Which I normally do, but because I tried to follow the docs blindly, I just used their syntax without questioning the single quotes !