Skip to content

Commit ef8bf6b

Browse files
YuryHrytsukmrnicegyu11
authored andcommitted
Update traefik router hardcoded priorities (ITISFoundation#953)
* Update traefik router hardcoded priorities * remove hardcoded priority from adminpanels
1 parent 8728f6c commit ef8bf6b

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

services/admin-panels/docker-compose.yml.j2

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ services:
8989
- traefik.http.services.adminpanels.loadbalancer.server.port=8888
9090
- traefik.http.routers.adminpanels.rule=Host(`${ADMINPANELS_DOMAIN}`)
9191
- traefik.http.routers.adminpanels.entrypoints=https
92-
- traefik.http.routers.adminpanels.priority=1
9392
- traefik.http.routers.adminpanels.tls=true
9493
- traefik.http.routers.adminpanels.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm
9594
placement:

services/registry/docker-compose.yml.j2

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ services:
5454
- traefik.http.routers.registry.rule=Host(`${REGISTRY_DOMAIN}`)
5555
- traefik.http.routers.registry.entrypoints=https
5656
- traefik.http.routers.registry.tls=true
57-
- traefik.http.routers.registry.priority=10
5857
- traefik.http.routers.registry.middlewares=ops_gzip@swarm, ops_auth@swarm
5958
- prometheus-job=registry
6059
- prometheus-port=5001

services/simcore/docker-compose.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ services:
9494
- traefik.http.routers.${SWARM_STACK_NAME}_apiserver_swagger.service=${SWARM_STACK_NAME}_api-server
9595
- traefik.http.routers.${SWARM_STACK_NAME}_apiserver_swagger.rule=PathPrefix(`/dev/`)
9696
- traefik.http.routers.${SWARM_STACK_NAME}_apiserver_swagger.entrypoints=simcore_api
97-
- traefik.http.routers.${SWARM_STACK_NAME}_apiserver_swagger.priority=2
97+
- traefik.http.routers.${SWARM_STACK_NAME}_apiserver_swagger.priority=6
9898
update_config:
9999
parallelism: 2
100100
order: start-first
@@ -153,7 +153,7 @@ services:
153153
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver_freshping.service=${SWARM_STACK_NAME}_static_webserver_freshping
154154
- traefik.http.services.${SWARM_STACK_NAME}_static_webserver_freshping.loadbalancer.server.port=8000
155155
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver_freshping.entrypoints=http
156-
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver_freshping.priority=10 # High number means high priority
156+
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver_freshping.priority=12 # High number means high priority
157157
- traefik.http.routers.${SWARM_STACK_NAME}_static_webserver_freshping.middlewares=${SWARM_STACK_NAME}_gzip@swarm,${SWARM_STACK_NAME}_static_webserver_retry,${SWARM_STACK_NAME}_static_webserver_prefix
158158
update_config:
159159
parallelism: 2
@@ -229,7 +229,7 @@ services:
229229
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_swagger.middlewares=${SWARM_STACK_NAME}_gzip@swarm, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader
230230
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_swagger.rule=PathPrefix(`/dev/`)
231231
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_swagger.entrypoints=http
232-
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_swagger.priority=2
232+
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_swagger.priority=6
233233
- traefik.http.middlewares.${SWARM_STACK_NAME_NO_HYPHEN}_webserver_swagger_auth.basicauth.users=${TRAEFIK_USER}:${TRAEFIK_PASSWORD}
234234
- traefik.http.routers.${SWARM_STACK_NAME}_webserver_swagger.middlewares=${SWARM_STACK_NAME_NO_HYPHEN}_webserver_swagger_auth, ${SWARM_STACK_NAME_NO_HYPHEN}_sslheader
235235
update_config: &webserver_update_config
@@ -726,7 +726,7 @@ services:
726726
- traefik.http.routers.${SWARM_STACK_NAME}_simcore_http.middlewares=ops_gzip@swarm, ops_sslheader@swarm, ops_ratelimit@swarm
727727
- traefik.http.routers.${SWARM_STACK_NAME}_simcore_http.service=${SWARM_STACK_NAME}_simcore_http
728728
- traefik.http.routers.${SWARM_STACK_NAME}_simcore_http.rule=((${DEPLOYMENT_FQDNS_CAPTURE_TRAEFIK_RULE_CATCHALL}) && PathPrefix(`/`)) || ( (PathPrefix(`/dashboard`) || PathPrefix(`/api`) ) && Host(`traefikdashboard.${MACHINE_FQDN}`))
729-
- traefik.http.routers.${SWARM_STACK_NAME}_simcore_http.priority=1 # Lowest possible priority, maintenance page takes priority "2" (higher, maintenance page has precedent) if it is up
729+
- traefik.http.routers.${SWARM_STACK_NAME}_simcore_http.priority=3
730730
# oSparc publicAPI
731731
- traefik.http.routers.${SWARM_STACK_NAME}_simcore_api.rule=(${DEPLOYMENT_API_DOMAIN_CAPTURE_TRAEFIK_RULE}) && PathPrefix(`/`)
732732
- traefik.http.routers.${SWARM_STACK_NAME}_simcore_api.entrypoints=https
@@ -785,7 +785,7 @@ services:
785785
- traefik.http.routers.${SWARM_STACK_NAME}_traefik_api.service=api@internal
786786
- traefik.http.routers.${SWARM_STACK_NAME}_traefik_api.rule=(PathPrefix(`/dashboard`) || PathPrefix(`/api`) ) && Host(`traefikdashboard.${MACHINE_FQDN}`)
787787
- traefik.http.routers.${SWARM_STACK_NAME}_traefik_api.entrypoints=http
788-
- traefik.http.routers.${SWARM_STACK_NAME}_traefik_api.priority=2
788+
- traefik.http.routers.${SWARM_STACK_NAME}_traefik_api.priority=6
789789
- traefik.http.routers.${SWARM_STACK_NAME}_traefik_api.middlewares=${SWARM_STACK_NAME}_auth@swarm, ${SWARM_STACK_NAME}_whitelist_ips@swarm
790790
- traefik.http.services.${SWARM_STACK_NAME}_traefik_api.loadbalancer.server.port=8080
791791
# Middlewares
@@ -829,7 +829,7 @@ services:
829829
- traefik.http.services.${SWARM_STACK_NAME}_whoami.loadbalancer.server.port=80
830830
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.rule=PathPrefix(`/whoami`)
831831
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.entrypoints=http
832-
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.priority=2
832+
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.priority=6
833833
- traefik.http.routers.${SWARM_STACK_NAME}_whoami.middlewares=${SWARM_STACK_NAME}_auth@swarm,${SWARM_STACK_NAME}_gzip@swarm
834834
update_config:
835835
parallelism: 2

0 commit comments

Comments
 (0)