Skip to content

Commit 65e1ab2

Browse files
authored
♻️ Update traefik router hardcoded priorities (#7141)
1 parent c681035 commit 65e1ab2

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

services/docker-compose-dev-vendors.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ services:
2424
- traefik.http.services.${SWARM_STACK_NAME}_manual.loadbalancer.healthcheck.interval=2000ms
2525
- traefik.http.services.${SWARM_STACK_NAME}_manual.loadbalancer.healthcheck.timeout=1000ms
2626
- traefik.http.routers.${SWARM_STACK_NAME}_manual.entrypoints=http
27-
- traefik.http.routers.${SWARM_STACK_NAME}_manual.priority=10
2827
- traefik.http.routers.${SWARM_STACK_NAME}_manual.rule=HostRegexp(`${VENDOR_DEV_MANUAL_SUBDOMAIN}\.(?P<host>.+)`)
2928
- traefik.http.routers.${SWARM_STACK_NAME}_manual.middlewares=${SWARM_STACK_NAME}_gzip@swarm, ${SWARM_STACK_NAME}_manual-auth
3029
networks:

services/docker-compose.local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ services:
134134
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.service=${SWARM_STACK_NAME}_webserver
135135
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.entrypoints=http
136136
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.rule=PathPrefix(`/dev/`)
137-
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.priority=3
137+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.priority=9
138138
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_local.middlewares=${SWARM_STACK_NAME}_gzip@swarm, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@swarm, ${SWARM_STACK_NAME}_webserver_retry
139139

140140
wb-api-server:

services/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ services:
5959
- traefik.http.services.${SWARM_STACK_NAME}_api-server.loadbalancer.healthcheck.timeout=1000ms
6060
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.rule=(Path(`/`) || Path(`/v0`) || PathPrefix(`/v0/`) || Path(`/api/v0/openapi.json`))
6161
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.entrypoints=simcore_api
62-
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.priority=1
62+
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.priority=3
6363
- traefik.http.routers.${SWARM_STACK_NAME}_api-server.middlewares=${SWARM_STACK_NAME}_gzip@swarm,ratelimit-${SWARM_STACK_NAME}_api-server,inflightreq-${SWARM_STACK_NAME}_api-server
6464
networks:
6565
- default
@@ -595,11 +595,11 @@ services:
595595
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.rule=(Path(`/osparc`) || Path(`/s4l`) || Path(`/s4llite`) || Path(`/s4lacad`) || Path(`/s4lengine`) || Path(`/s4ldesktop`) || Path(`/s4ldesktopacad`) || Path(`/tis`) || Path(`/tiplite`) || Path(`/transpiled`) || Path(`/resource`) || PathPrefix(`/osparc/`) || PathPrefix(`/s4l/`) || PathPrefix(`/s4llite/`) || PathPrefix(`/s4lacad/`) || PathPrefix(`/s4lengine/`) || PathPrefix(`/s4ldesktop/`) || PathPrefix(`/s4ldesktopacad/`) || PathPrefix(`/tis/`) || PathPrefix(`/tiplite/`) || PathPrefix(`/transpiled/`) || PathPrefix(`/resource/`))
596596
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.service=${SWARM_STACK_NAME}_static_webserver
597597
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.entrypoints=http
598-
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.priority=2
598+
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.priority=6
599599
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver.middlewares=${SWARM_STACK_NAME}_gzip@swarm,${SWARM_STACK_NAME}_static_webserver_retry
600600
# catchall for legacy services (this happens if a backend disappears and a frontend tries to reconnect, the right return value is a 503)
601601
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.service=${SWARM_STACK_NAME}_legacy_services_catchall
602-
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.priority=1
602+
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.priority=3
603603
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.entrypoints=http
604604
- traefik.http.routers.${SWARM_STACK_NAME}_legacy_services_catchall.rule=PathRegexp(`^/x/(?P<node_uuid>\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)[\/]?`)
605605
# this tricks traefik into a 502 (bad gateway) since the service does not exist on this port
@@ -612,7 +612,7 @@ services:
612612
# catchall for dynamic-sidecar powered-services (this happens if a backend disappears and a frontend tries to reconnect, the right return value is a 503)
613613
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.service=${SWARM_STACK_NAME}_modern_services_catchall
614614
# the priority is a bit higher than webserver, the webserver is the fallback to everything and has prio 2
615-
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.priority=3
615+
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.priority=9
616616
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.entrypoints=http
617617
# in theory the pattern should be uuid.services.OSPARC_DOMAIN, but anything could go through.. so let's catch everything
618618
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.rule=HostRegexp(`(?P<node_uuid>\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)\.services\.(?P<host>.+)`)
@@ -836,7 +836,7 @@ services:
836836
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.service=${SWARM_STACK_NAME}_webserver
837837
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.rule=(Path(`/`) || Path(`/v0`) || Path(`/socket.io/`) || Path(`/static-frontend-data.json`) || PathRegexp(`^/study/(?P<study_uuid>\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)`) || Path(`/view`) || Path(`/#/view`) || Path(`/#/error`) || PathPrefix(`/v0/`))
838838
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.entrypoints=http
839-
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.priority=2
839+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.priority=6
840840
- traefik.http.routers.${SWARM_STACK_NAME}_webserver.middlewares=${SWARM_STACK_NAME}_gzip@swarm, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader@swarm, ${SWARM_STACK_NAME}_webserver_retry
841841
networks: &webserver_networks
842842
- default

0 commit comments

Comments
 (0)