Skip to content

Commit

Permalink
🐛Traefik: partially revert changes (#6270)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg authored Aug 29, 2024
1 parent c1f604e commit aead556
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_dynamic_proxy_spec(
f"traefik.http.services.{scheduler_data.proxy_service_name}.loadbalancer.server.port": "80",
f"traefik.http.routers.{scheduler_data.proxy_service_name}.entrypoints": "http",
f"traefik.http.routers.{scheduler_data.proxy_service_name}.priority": "10",
f"traefik.http.routers.{scheduler_data.proxy_service_name}.rule": f"HostRegexp(`{scheduler_data.node_uuid}\\.services\\.`)",
f"traefik.http.routers.{scheduler_data.proxy_service_name}.rule": rf"HostRegexp(`{scheduler_data.node_uuid}.services.{{host:.+}}`)",
f"traefik.http.routers.{scheduler_data.proxy_service_name}.middlewares": f"{dynamic_services_scheduler_settings.SWARM_STACK_NAME}_gzip@swarm, {scheduler_data.proxy_service_name}-security-headers",
"dynamic_type": "dynamic-sidecar", # tagged as dynamic service
}
Expand Down
2 changes: 1 addition & 1 deletion services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ services:
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.priority=3
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.entrypoints=http
# in theory the pattern should be uuid.services.OSPARC_DOMAIN, but anything could go through.. so let's catch everything
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.rule=HostRegexp(`(?i)[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\.services\.`)
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.rule=HostRegexp(`{node_uuid:(?i)[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}}.services.{host:.+}`)
# this tricks traefik into a 502 (bad gateway) since the service does not exist on this port
- traefik.http.services.${SWARM_STACK_NAME}_modern_services_catchall.loadbalancer.server.port=0
# this tricks traefik into returning a 503 (service unavailable) since the healthcheck will always return false
Expand Down

0 comments on commit aead556

Please sign in to comment.