Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elisabettai traefik routes authentication popup #1

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ services:
- traefik.http.services.${SWARM_STACK_NAME}_legacy_services_catchall.loadbalancer.healthcheck.path=/some/invalid/path/to/generate/a/503
- traefik.http.services.${SWARM_STACK_NAME}_legacy_services_catchall.loadbalancer.healthcheck.interval=500s
- traefik.http.services.${SWARM_STACK_NAME}_legacy_services_catchall.loadbalancer.healthcheck.timeout=1ms
# TODO: ANE once the dynamic sidecar powered jupyter lab is around we can activate this
# see [#2718](https://github.com/ITISFoundation/osparc-simcore/issues/2718)
# catchall for modern services (this happens if a backend disappears and a frontend tries to reconnect, the right return value is a 503)
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.service=${SWARM_STACK_NAME}_modern_services_catchall
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.priority=1
# the priority is set the same as the webserver, the webserver is the fallback to everything and has prio 2
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.priority=2
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.entrypoints=http
# Please review this regexp, I was trying to match https://7f8a1880-64a8-4c8a-afe1-92d5a6deb98e.services.osparc-master.speag.com. Not sure if dy-proxy and dy-sidecar need to be added
- traefik.http.routers.${SWARM_STACK_NAME}_modern_services_catchall.rule=hostregexp(`\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.{host:.+}`)
# 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(`{node_uuid:.+}.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