-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Report
When an HTTPScaledObject is configured without specifying hosts (either omitted entirely or set to an empty array), it fails to route HTTP requests that contain a Host header. This breaks the expected "catch-all" behavior documented in the codebase.
Expected Behavior
According to the API documentation and code comments, when spec.hosts is omitted or empty, the HTTPScaledObject should act as a catch-all and route all incoming HTTP requests regardless of their Host header value.
# HTTPScaledObject without hosts specified
apiVersion: http.keda.sh/v1alpha1
kind: HTTPScaledObject
metadata:
name: my-app
spec:
# hosts: [] # omitted or empty - should match ALL hosts
scaleTargetRef:
service: my-app
port: 8080
Should route successfully:
✅ curl http://interceptor:8080/ (no Host header)
✅ curl -H "Host: example.com" http://interceptor:8080/ (any Host header)
✅ curl -H "Host: customer1.com" http://interceptor:8080/ (any Host header)
Actual Behavior
The current implementation only routes requests that have no Host header or an empty Host header. Any request with a populated Host header returns 404 Not Found.
Actual routing behavior:
❌ curl http://interceptor:8080/ (no Host header) → 404 Not Found
❌ curl -H "Host: example.com" http://interceptor:8080/ → 404 Not Found
❌ curl -H "Host: anything.com" http://interceptor:8080/ → 404 Not Found
Steps to Reproduce the Problem
- Deploy KEDA HTTP Add-on (any recent version)
- Create a test service
- Create HTTPScaledObject without hosts
- Test the routing
Logs from KEDA HTTP operator
example
HTTP Add-on Version
0.10.0
Kubernetes Version
1.32
Platform
Amazon Web Services
Anything else?
I have tried adding a wildcard '*' to hosts and that doesnt work
Metadata
Metadata
Assignees
Labels
Type
Projects
Status