Overview
Traefik serves as the edge proxy and ingress controller, routing external HTTP/HTTPS traffic to services within the cluster. It provides middleware for CORS, rate limiting, and authentication.Configuration
Nixidy Module (nixidy/env/local/traefik.nix)
Traefik is deployed in the edge namespace via Helm:
Ports & Access
| Port | Protocol | EntryPoint | Purpose |
|---|---|---|---|
| 30081 | HTTP | web | HTTP traffic |
| 30444 | HTTPS | websecure | HTTPS traffic |
Providers
Traefik is configured with multiple providers:OpenTelemetry Tracing
Traefik sends traces to the OTel Collector:Middleware
Traefik includes custom middleware for common concerns:CORS Middleware
Rate Limit Middleware
IngressRoutes
Traefik uses IngressRoute CRDs to define routing:Greeter Service (gRPC-Web)
Gateway Service
Auth Service (HTTP)
Frontend (Catch-all)
Route Priority
Routes are evaluated by priority (higher number = higher priority):- Priority 100: API services (greeter, gateway)
- Priority 90: Auth service
- Priority 1: Frontend (catch-all)
Integration
Istio Service Mesh
Traefik routes external traffic into the cluster, then Istio mesh handles internal service-to-service communication.OpenTelemetry
Traefik spans are sent to the OTel Collector and stored in Tempo, providing end-to-end tracing from ingress to backend services.Microservices
All backend services (greeter, gateway, auth, frontend) are exposed through Traefik routes.Observability
- Logs: INFO level (configurable in nixidy module)
- Metrics: Prometheus-compatible metrics endpoint
- Traces: OpenTelemetry gRPC to
otel-collector.observability:4317
Custom Resource Definitions
Traefik installs multiple CRDs:- IngressRoute - HTTP routing
- IngressRouteTCP - TCP routing
- IngressRouteUDP - UDP routing
- Middleware - Request/response transformation
- TLSOption - TLS configuration
- TraefikService - Weighted routing, mirroring