-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Service Name Duplication and Provider Mismatch in Standalone Traefik Setups
Environment
- Traefik Version: v3.5.2
- MM Versions Tested:
traefik-int→ latest
- Setup: Standalone Traefik (no Pangolin) with ~100 file-based routes
- Docker Compose: Standard standalone configuration
Issue Summary
Middleware Manager has issues when used with standalone Traefik setups that use file-based service definitions for external hosts.
Bug #1: Service Name Duplication (traefik-int tag)
MM recursively appends @file suffixes to service names on each config regeneration:
Progression:
- Initial:
service-name@file✅ - 1st run:
service-name@file@file❌ - 2nd run:
service-name@file@file@file@file❌
Traefik Logs:
ERR error="the service \"changedetection-xxxxxx@file@file\" does not exist"
ERR error="the service \"memos-xxxxx@file@file@file@file\" does not exist"
Bug #2: Provider Mismatch (latest tag)
The duplication bug is fixed, but MM now incorrectly assumes all services are Docker containers instead of file-defined external services.
My Working Configuration (production-routes.yml):
routers:
xxx-xxxxx-auth:
service: "xxx-xxxxx@file" # Points to external service
services:
xxx-xxxx@file: # External host definition
loadBalancer:
servers:
- url: "http://192.168.2.21:81" # External IPWhat MM Generates (resource-overrides.yml):
routers:
xxx-xxxxx-auth-auth:
service: "xxx-xxxxx@docker" # Wrong! No such container exists
services:
xxx-xxxxx@file: # Correct service definition preserved
loadBalancer:
servers:
- url: "http://192.168.2.21:81"Result: Routers point to non-existent @docker services while the actual @file services exist.
Expected Behavior
For standalone setups, MM should preserve the original provider suffix (@file) when the services are defined in static files pointing to external hosts.
Reproduction Steps
- Setup standalone Traefik with file-based routes to external services
- Add MM with
ACTIVE_DATA_SOURCE=traefik - MM detects routes but generates
@dockerservice references - Traefik throws "service does not exist" errors
Configuration
middleware-manager:
image: hhftechnology/middleware-manager:latest
environment:
- ACTIVE_DATA_SOURCE=traefik
- TRAEFIK_API_URL=http://traefik:8080
- TRAEFIK_CONF_DIR=/confRoot Cause
MM's service detection logic appears to default to @docker provider for standalone setups, regardless of how the services are actually defined. For mixed environments (file-defined services + middleware management), MM should detect and preserve the original provider type.
Thanks for your effort on this project!