Traefik v1.7 : segment issue

15 Views Asked by At

Background : I'm "stuck" with and "old" infra, trying to configure a new nexus registry using swarm docker, behind traefik v1.7.

I'm trying to use "segments", as stated in the doc

docker service create \
  --name nexus \
  --label service-name=nexus \
  --label namespace=nexus \
  --container-label namespace=nexus \
  --network tools-network \
  --publish 8082:8081 \
  --publish 5001:5000 \
  --limit-cpu=1 \
  --reserve-memory=2GB \
  --limit-memory=3GB \
[...]
  --label traefik.nexus_admin_prd_vdr.frontend.rule=Host:nexus.example.org \
  --label traefik.nexus_admin_prd_vdr.port=8081 \
  --label traefik.nexus_admin_prd_vdr.protocol=http \
  --label traefik.nexus_admin_prd_vdr.loadbalancer.stickiness=true \
  --label traefik.nexus_registry_prd_vdr.frontend.rule=Host:registry.example.org \
  --label traefik.nexus_registry_prd_vdr.port=5000 \
  --label traefik.nexus_registry_prd_vdr.protocol=http \
  --label traefik.nexus_registry_prd_vdr.loadbalancer.stickiness=true \  --label traefik.docker.network=tools-network \
  sonatype/nexus3:3.65.0

When I start this container, that makes a strange issue : it's "breaking" an other container (grafana), where some graph have no value for 2 weeks...
BUT.... If I correct the labels with :

  --label traefik.frontend.rule=Host:nexus.eaxmple.org \
  --label traefik.port=8081 \
  --label traefik.protocol=http \
  --label traefik.loadbalancer.stickiness=true \
  --label traefik.registry.frontend.rule=Host:registry.example.org \
  --label traefik.registry.port=5000 \
  --label traefik.registry.protocol=http \
  --label traefik.registry.loadbalancer.stickiness=true \

i.e. by removing one segment name, like "admin" (same behaviour if I remove "registry") :
-> All is working fine (Grafana container, admin frontend, and registry frontend)
-> but I don't see the "admin" frontend and backend in the Traefik console.
Edit : I just found out that the "segment" with no name defined is also not working in https (but OK in plain http)

Could you please help me fix my config ?

0

There are 0 best solutions below