This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
Namespace selector for allowedRoutes
is applied to route instead of namespace
#117
Labels
theme/k8s-gateway-api
Related to the Kubernetes Gateway API standard
type/bug
Something isn't working
Community Note
Overview of the Issue
The Gateway API spec specifies for
RouteNamespaces.selector
thatThis means that the label selector must match the namespace of the route, not the route itself.
The current implementation of the controller compares the labels on the route itself where it should be comparing against the labels on the namespace containing the route:
consul-api-gateway/internal/k8s/reconciler/utils.go
Lines 99 to 105 in 0c46bf3
Reproduction Steps
Create a
Gateway
in one namespace with a selector for namespaces w/ label (code)Create
HTTPRoute
(code) in a differentNamespace
(code) where the labels on theNamespace
match the selector on theGateway
Observe that route never attaches to gateway:
Logs
Expected behavior
HTTPRoute
should successfully attach toGateway
Environment details
Additional Context
The text was updated successfully, but these errors were encountered: