Repository navigation
gateway-api: routes rejected when using multiple listeners with allowedRoutes #45559
Copy link
Copy link
Closed
Closed
Copy link
Labels
area/agentCilium agent related.Cilium agent related.feature/k8s-gateway-apikind/bugThis is a bug in the Cilium logic.This is a bug in the Cilium logic.kind/community-reportThis was reported by a user in the Cilium community, eg via Slack.This was reported by a user in the Cilium community, eg via Slack.needs/triageThis issue requires triaging to establish severity and affected area.This issue requires triaging to establish severity and affected area.
Description
Is there an existing issue for this?
- I have searched the existing issues
Version
equal or higher than v1.19.3 and lower than v1.20.0
What happened?
Route attachment fails as GRPC and HTTP collapse into one.
See cec-dump.broken.yaml which. misses HTTPRoutes related resources alltogether
How can we reproduce the issue?
I've been using the setup defined in: https://github.com/eufriction/k8s-cilium-gapi/blob/main/scenarios/22-http-grpc-allowed-routes/README.md
Deploy the following Gateway and start to attach 2 HTTPRoutes and 2 GRPCRoutes results in missing routes.
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/gateway.networking.k8s.io/gateway_v1.json
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: allowed-routes-gateway
namespace: gateway-system
labels:
app.kubernetes.io/part-of: demo
spec:
gatewayClassName: cilium
listeners:
- name: https
protocol: HTTPS
port: 443
hostname: "*.example.test"
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: allowed-routes-gateway-tls
allowedRoutes:
namespaces:
from: All
kinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
- name: grpcs
protocol: HTTPS
port: 50051
hostname: "*.example.test"
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: allowed-routes-gateway-tls
allowedRoutes:
namespaces:
from: All
kinds:
- group: gateway.networking.k8s.io
kind: GRPCRoute
Cilium Version
1.19.3
Kernel Version
Linux k8s-cilium-gapi-worker2 6.12.76-linuxkit #1 SMP Mon Mar 30 09:10:35 UTC 2026 aarch64 aarch64 aarch64 GNU/Linux
Kubernetes Version
kind, 1.35
Regression
Broken in main, 1.19.1, and 1.19.3
Sysdump
No response
Relevant log output
Anything else?
No response
Cilium Users Document
- Are you a user of Cilium? Please add yourself to the Users doc
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/agentCilium agent related.Cilium agent related.feature/k8s-gateway-apikind/bugThis is a bug in the Cilium logic.This is a bug in the Cilium logic.kind/community-reportThis was reported by a user in the Cilium community, eg via Slack.This was reported by a user in the Cilium community, eg via Slack.needs/triageThis issue requires triaging to establish severity and affected area.This issue requires triaging to establish severity and affected area.
Activity
[-]gateway-api: routes rejected when using multiple listenerd with allowedRoutes[/-][+]gateway-api: routes rejected when using multiple listeners with allowedRoutes[/+]dinoshauer commentedon Apr 23, 2026
I was just about to file this as a new issue when I found yours — sounds like the same underlying bug with a different listener combination. Posting my data point here instead of duplicating.
We're hitting it on
quay.io/cilium/cilium:v1.19.3.Scenario: One Gateway with three listeners —
HTTP,HTTPS(Terminate), andTLS(Passthrough). HTTPRoutes attached to either HTTP or HTTPS listener are rejected withNotAllowedByListeners: "HTTPRoute is not allowed to attach to this Gateway due to route kind restrictions". The TLSRoute on the TLS listener is accepted. Removing the TLS listener from the Gateway immediately flips the HTTPRoutes toAccepted: True.Pinning
allowedRoutes.kindsexplicitly on every listener (HTTPRoute on HTTP/HTTPS, TLSRoute on TLS) does not fix it — HTTPRoutes are still rejected with the same message.This looks like a regression of (or incomplete fix for) #42013. PR #43802 and its v1.19 backport #43922 both merged 2026-01-22 but neither is listed in the v1.19.2 / v1.19.3 release notes.
Minimal repro (three listeners on one Gateway):
Env: Cilium
v1.19.3, EKSv1.34.4-eks-f69f56f, kernel6.12.77-99.140.amzn2023.aarch64.eufriction commentedon Apr 23, 2026
@dinoshauer Thanks for adding additional information. I'm looking into if there is an easy fix for this as I found the behavior when working on #44889.
Will test with the setup in https://github.com/eufriction/k8s-cilium-gapi/tree/main/scenarios/22-http-grpc-allowed-routes, I could possibly add a TLSRoute there or in another scenario to cover your use case.
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
youngnick commentedon Apr 28, 2026
Okay, so, as I said on the other issue, this is not tested well currently because it is not a supported upstream behavior. I would strongly recommend moving away from using it if you can, as I am not sure if it will continue being supported upstream. That's going to depend on upstream discussions I don't control.
However, given that it did used to work, I can see fixing it for now. WIth that in mind, I've merged #45371, so it would be worth retesting with that fix implemented.
eufriction commentedon Apr 29, 2026
@youngnick Just for my understanding, it's the multiplexing of HTTPS and TLS, discussed in kubernetes-sigs/gateway-api#4271, that you refer to should be avoided, not the allowed routes in the original issue description?
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
youngnick commentedon May 1, 2026
@eufriction, yes, that's right.
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
fix(gateway): pin identical allowedRoutes.kinds on port 443 listeners…
docs(external-database-exposure): default to subdomain hostnames, exc…
docs(external-database-exposure): default to subdomain hostnames, exc…
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port
fix(unifi): stop broken TLSRoute drift, document Cilium gateway blockers
gateway-api: scope CheckGatewayRouteKindAllowed by sectionName/port