Open yajo opened 1 month ago
FWIW the problem is only in prod.yaml
. In test.yaml
, traefik v1 labels are kept as expected.
I suppose what you are referring to is that the part Path:/web,/web/{anything:.*},/website/info,/website/info/{anything:.*}
is in the syntax of Traefik 1.
If this is what you mean, it still works (since this was like this before we could choose the version and it was fully compatible with Traefik 2). That is, I understand that this syntax is still compatible with Traefik 2.
An improvement for using the new syntax would be to replace the old syntax with:
Host(one.example.com) && (PathPrefix(/web) || PathPrefix(/website/info))
Is this what you mean?
No, I just mean that the traefik v1 labels are invalid. They are using traefik v2 syntax.
Incorrect v1 syntax:
traefik.forbiddenCrawlers-0.frontend.rule: Host(`one.example.com`);Path:/web,/web/{anything:.*},/website/info,/website/info/{anything:.*}
traefik.main-0.frontend.rule: Host(`one.example.com`)
traefik.longpolling-0.frontend.rule: Host(`one.example.com`);Path:/longpolling/{anything:.*}
traefik.alt-1.frontend.rule: Host(`two.example.com`)
Correct v1 syntax:
traefik.forbiddenCrawlers-0.frontend.rule: Host:one.example.com;Path:/web,/web/{anything:.*},/website/info,/website/info/{anything:.*}
traefik.main-0.frontend.rule: Host:one.example.com
traefik.longpolling-0.frontend.rule: Host:one.example.com;Path:/longpolling/{anything:.*}
traefik.alt-1.frontend.rule: Host:two.example.com
I have tested, selecting Traefik v1 when is asked, and i get correct v1 syntax. Have you selected Traefik v1 version when asked by template? I would say that you have selected Traefik v2 version
Yes, I selected traefik v2, but the v1 labels got wrong v1 syntax.
I think I’m not understanding you. Just to know, why do you need Traefik 1 labels when using Traefik 2?
Do you mean just removing those rules when traefik 2 is selected?
Yes, they should be removed or fixed. But I guess removed would make more sense, when you choose v2.
Describe the bug
If traefik 2 is chosen, traefik 1 labels are added with wrong format.
To Reproduce
Affected versions: 7.0.3
Steps to reproduce the behavior:
Traefik v1 labels are generated like this:
Expected behavior A clear and concise description of what you expected to happen.
Traefik v1 labels should either be removed (because I chose v2, after all) or be kept as they were before, like this:
Additional context Add any other context about the problem here. (e.g. OS, Docker version, ...) I don't use traefik v1.