-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Labels
area/httproute/coreRelates to all Core features of HTTPRouteRelates to all Core features of HTTPRoutebugSomething isn't workingSomething isn't workingconformanceRelates to passing Gateway API conformance testsRelates to passing Gateway API conformance testsrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.
Milestone
Description
Describe the bug
NGINX Kubernetes Gateway doesn't try to attach to a listener if an HTTPRoute has 0 hostnames.
To Reproduce
Steps to reproduce the behavior:
HTTPRoute:
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: coffee
spec:
parentRefs:
- name: gateway
sectionName: http
rules:
- matches:
- path:
type: PathPrefix
value: /coffee
backendRefs:
- name: coffee
port: 80
In the status of the HTTPRoute, NKG reports:
Status:
Parents:
Conditions:
Last Transition Time: 2023-05-03T15:55:08Z
Message: Listener hostname does not match the HTTPRoute hostnames
Observed Generation: 1
Reason: NoMatchingListenerHostname
Status: False
Type: Accepted
Controller Name: k8s-gateway.nginx.org/nginx-gateway-controller
Parent Ref:
Group: gateway.networking.k8s.io
Kind: Gateway
Name: gateway
Namespace: default
Section Name: http
Expected behavior
- HTTPRoute attaches to a listener
- Traffic (in this example) -
curl <any-host>/coffee
routes to coffee service
Additional context
Conformance tests often don't include hostnames in HTTPRoutes. Example -- https://github.com/kubernetes-sigs/gateway-api/blob/v0.6.2/conformance/tests/httproute-matching.yaml
ultrr
Metadata
Metadata
Assignees
Labels
area/httproute/coreRelates to all Core features of HTTPRouteRelates to all Core features of HTTPRoutebugSomething isn't workingSomething isn't workingconformanceRelates to passing Gateway API conformance testsRelates to passing Gateway API conformance testsrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.