Skip to content

Refresh Traefik static config instead of seeding it once - #943

Open
ilnytskyi wants to merge 1 commit into
wardenenv:mainfrom
ilnytskyi:fix/traefik-static-config-refresh
Open

Refresh Traefik static config instead of seeding it once#943
ilnytskyi wants to merge 1 commit into
wardenenv:mainfrom
ilnytskyi:fix/traefik-static-config-refresh

Conversation

@ilnytskyi

@ilnytskyi ilnytskyi commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Improved traefik v2 to v3 BC handling after upgrade to v3: #925

Since recently, the v2 fixes on environments templates started to land like:
#940
#934

Although, actually all the envs templates must be moved to new labels syntax one day, the proper BC fix for now is to keep it global
${WARDEN_HOME_DIR}/etc/traefik/traefik.yml in sync with ${WARDEN_DIR}/config/traefik/traefik.yml automatically.

If drift detected during environment up start restart current config at ~/.warden is backed up and new one is applied.

${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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant