Refresh Traefik static config instead of seeding it once - #2
Open
ilnytskyi wants to merge 1 commit into
Open
Conversation
ilnytskyi
force-pushed
the
fix/traefik-static-config-refresh
branch
2 times, most recently
from
July 29, 2026 09:02
b0daf0d to
bd55424
Compare
${WARDEN_HOME_DIR}/etc/traefik/traefik.yml is generated configuration rather
than user state, but it was only copied into place when absent. After a Traefik
major upgrade some settings, such as the router rule syntax, have to be
adjusted globally for backward compatibility, and installs that already had the
file never received them.
Refresh it whenever it drifts from the shipped version, keeping the previous
copy as traefik.yml.bak, and restart Traefik afterwards since static
configuration is never hot reloaded.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ilnytskyi
force-pushed
the
fix/traefik-static-config-refresh
branch
from
July 29, 2026 09:08
bd55424 to
2cbfb7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
~/.warden/etc/traefik/traefik.yml was copied from config/traefik/traefik.yml only when absent, so installs predating the Traefik 3 upgrade keep a static config without
core.defaultRuleSyntax. Traefik 3 then parses Warden's v2 style router rules as v3 syntax and silently stops matching them, which is the subdomain routing breakage reported in wardenenv#933.The shipped config has carried that setting for a while; it simply never reached existing installs. Declaring
ruleSyntax=v2per router (wardenenv#934, wardenenv#940) works around this from the wrong layer: it has to be repeated for every new router, and it cannot cover routers users define themselves in project .warden/warden-env.yml files or in custom environment types, which Warden has no way to rewrite.Refresh the file whenever it drifts from the shipped version, keeping the previous copy as traefik.yml.bak. Restart Traefik when it changed, since Traefik never reloads static configuration and Compose will not recreate the container just because a bind mounted file changed. This runs on
svc upand onenv up|start|restart, the latter being what people actually reach for after an upgrade.Set WARDEN_TRAEFIK_CONFIG_MANAGED=0 to hand-manage the file.
warden doctornow reports the running Traefik image and diffs the in-use config against the shipped one.Check List
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Check List
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you've submitted
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.