Repository navigation
gateway-api: fix allowedRoute namespace and kind restrictions on multi-listener - #45693
Merged
Merged
Conversation
Contributor
|
The code changes look great, in the first commit, could you add an overall manifest test case for the |
eufriction
force-pushed
the
fix/allowed-routes-main
branch
from
April 30, 2026 05:42
f96a230 to
88bc557
Compare
youngnick
reviewed
May 1, 2026
youngnick
reviewed
May 1, 2026
youngnick
left a comment
Contributor
There was a problem hiding this comment.
One last small thing, and this one is ready to go.
Filter listener loop by parentRef.SectionName and parentRef.Port so a non-targeted listener cannot overwrite the Accepted condition. Fixes: cilium#45559 Signed-off-by: Martin Lindberg <[email protected]>
Continue to the next listener when a Selector doesn't match instead of returning false immediately, so a permissive listener later in the spec is still evaluated. Fixes: cilium#42159 Signed-off-by: Martin Lindberg <[email protected]>
eufriction
force-pushed
the
fix/allowed-routes-main
branch
from
May 1, 2026 10:52
88bc557 to
5083b33
Compare
Contributor
Author
@youngnick Makes sense, added the requests paths and methods. |
Contributor
|
/test |
youngnick
approved these changes
May 5, 2026
youngnick
enabled auto-merge
May 6, 2026 07:49
4 tasks
julianmaze
added a commit
to julianmaze/homelab
that referenced
this pull request
Jul 26, 2026
- Fix config drift: git had the unifi TLS passthrough listener commented out while the live Gateway still had it (with 0 attached routes) because the TLSRoute's parentRef had been repointed at the local-subdomain listener, which only allows HTTPRoute. This is why the gateway wasn't serving unifi at all. - Attempted the intended end-state (HTTPRoute + Terminate TLS at the gateway + BackendTLSPolicy re-encrypting to the self-signed backend cert), but confirmed empirically that Cilium 1.19.4's operator does not implement BackendTLSPolicy at all (missing from its required/optional GatewayAPI GVK set; no TLS transport_socket ever added to the backend envoy cluster). That feature only ships starting in Cilium 1.20 (not yet GA). Reverted this part and restored/renamed unifi/app/http_route.yaml to tls_route.yaml (TLSRoute, matching the working passthrough model). - While restoring TLS Passthrough, hit a second, pre-existing Cilium bug: allowedRoutes namespace/kind restrictions misbehave on multi-listener Gateways (cilium/cilium#45559, #42159), fixed by cilium/cilium#45693 and released in v1.19.6 (we're on 1.19.4). This is the real root cause of unifi being unreachable via the Gateway; it's independent of the BackendTLSPolicy work above. - Documented both blockers in gateway/default.yaml and unifi/README.md. Holding off on the Cilium upgrade for now per discussion - 1.19.6 alone doesn't unlock gateway-terminated SSL (still needs 1.20 for BackendTLSPolicy), so there's no rush. unifi remains reachable directly via its LoadBalancer IP in the meantime.
lexfrei
added a commit
to cozystack/cozystack
that referenced
this pull request
Aug 17, 2026
Some GatewayClasses have their provider terminate TLS in front of the Gateway and reach it over plain HTTP. On such a class the platform issued origin certificates nobody serves, and where ACME could not complete, the Gateway's listeners never became ready. Add certMode=edge to TenantGateway. The controller renders the apex, its wildcard and every inheriting child apex as plain HTTP listeners carrying the same label-based allowedRoutes as the HTTPS listeners of the other modes, so application HTTPRoutes attach by hostname unchanged. It mints no Issuer and no Certificate, and removes the http-to-https redirect route, because the edge performs that redirect itself. TLSPassthroughServices are not rendered: an HTTP-only edge cannot carry a TLS listener, which leaves the endpoints relying on one unpublished through such a Gateway. The hostname-less port-80 listener is left out. It carries the ACME challenge and the redirect in the other modes and has neither here, so it would only be a catch-all admitting any hostname. Leaving it out also keeps a hostname-pinned listener at index 0, which is what Cilium's first-listener-wins namespace check reads before the fix in cilium/cilium#45693. Moving into the mode garbage-collects the Issuer and Certificate objects the controller owned. The TLS Secrets they issued stay behind: cert-manager runs with enableCertificateOwnerRef false, so a Certificate does not own the Secret it issued into. Every mode transition already behaves that way. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
lexfrei
added a commit
to cozystack/cozystack
that referenced
this pull request
Aug 20, 2026
Some GatewayClasses have their provider terminate TLS in front of the Gateway and reach it over plain HTTP. On such a class the platform issued origin certificates nobody serves, and where ACME could not complete, the Gateway's listeners never became ready. Add certMode=edge to TenantGateway. The controller renders the apex, its wildcard and every inheriting child apex as plain HTTP listeners carrying the same label-based allowedRoutes as the HTTPS listeners of the other modes, so application HTTPRoutes attach by hostname unchanged. It mints no Issuer and no Certificate, and removes the http-to-https redirect route, because the edge performs that redirect itself. TLSPassthroughServices are not rendered: an HTTP-only edge cannot carry a TLS listener, which leaves the endpoints relying on one unpublished through such a Gateway. The hostname-less port-80 listener is left out. It carries the ACME challenge and the redirect in the other modes and has neither here, so it would only be a catch-all admitting any hostname. Leaving it out also keeps a hostname-pinned listener at index 0, which is what Cilium's first-listener-wins namespace check reads before the fix in cilium/cilium#45693. Moving into the mode garbage-collects the Issuer and Certificate objects the controller owned. The TLS Secrets they issued stay behind: cert-manager runs with enableCertificateOwnerRef false, so a Certificate does not own the Secret it issued into. Every mode transition already behaves that way. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
lexfrei
added a commit
to cozystack/cozystack
that referenced
this pull request
Sep 2, 2026
Some GatewayClasses have their provider terminate TLS in front of the Gateway and reach it over plain HTTP. On such a class the platform issued origin certificates nobody serves, and where ACME could not complete, the Gateway's listeners never became ready. Add certMode=edge to TenantGateway. The controller renders the apex, its wildcard and every inheriting child apex as plain HTTP listeners carrying the same label-based allowedRoutes as the HTTPS listeners of the other modes, so application HTTPRoutes attach by hostname unchanged. It mints no Issuer and no Certificate, and removes the http-to-https redirect route, because the edge performs that redirect itself. TLSPassthroughServices are not rendered: an HTTP-only edge cannot carry a TLS listener, which leaves the endpoints relying on one unpublished through such a Gateway. The hostname-less port-80 listener is left out. It carries the ACME challenge and the redirect in the other modes and has neither here, so it would only be a catch-all admitting any hostname. Leaving it out also keeps a hostname-pinned listener at index 0, which is what Cilium's first-listener-wins namespace check reads before the fix in cilium/cilium#45693. Moving into the mode garbage-collects the Issuer and Certificate objects the controller owned. The TLS Secrets they issued stay behind: cert-manager runs with enableCertificateOwnerRef false, so a Certificate does not own the Secret it issued into. Every mode transition already behaves that way. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
lexfrei
added a commit
to cozystack/cozystack
that referenced
this pull request
Sep 3, 2026
Some GatewayClasses have their provider terminate TLS in front of the Gateway and reach it over plain HTTP. On such a class the platform issued origin certificates nobody serves, and where ACME could not complete, the Gateway's listeners never became ready. Add certMode=edge to TenantGateway. The controller renders the apex, its wildcard and every inheriting child apex as plain HTTP listeners carrying the same label-based allowedRoutes as the HTTPS listeners of the other modes, so application HTTPRoutes attach by hostname unchanged. It mints no Issuer and no Certificate, and removes the http-to-https redirect route, because the edge performs that redirect itself. TLSPassthroughServices are not rendered: an HTTP-only edge cannot carry a TLS listener, which leaves the endpoints relying on one unpublished through such a Gateway. The hostname-less port-80 listener is left out. It carries the ACME challenge and the redirect in the other modes and has neither here, so it would only be a catch-all admitting any hostname. Leaving it out also keeps a hostname-pinned listener at index 0, which is what Cilium's first-listener-wins namespace check reads before the fix in cilium/cilium#45693. Moving into the mode garbage-collects the Issuer and Certificate objects the controller owned. The TLS Secrets they issued stay behind: cert-manager runs with enableCertificateOwnerRef false, so a Certificate does not own the Secret it issued into. Every mode transition already behaves that way. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
lexfrei
added a commit
to cozystack/cozystack
that referenced
this pull request
Sep 4, 2026
Some GatewayClasses have their provider terminate TLS in front of the Gateway and reach it over plain HTTP. On such a class the platform issued origin certificates nobody serves, and where ACME could not complete, the Gateway's listeners never became ready. Add certMode=edge to TenantGateway. The controller renders the apex, its wildcard and every inheriting child apex as plain HTTP listeners carrying the same label-based allowedRoutes as the HTTPS listeners of the other modes, so application HTTPRoutes attach by hostname unchanged. It mints no Issuer and no Certificate, and removes the http-to-https redirect route, because the edge performs that redirect itself. TLSPassthroughServices are not rendered: an HTTP-only edge cannot carry a TLS listener, which leaves the endpoints relying on one unpublished through such a Gateway. The hostname-less port-80 listener is left out. It carries the ACME challenge and the redirect in the other modes and has neither here, so it would only be a catch-all admitting any hostname. Leaving it out also keeps a hostname-pinned listener at index 0, which is what Cilium's first-listener-wins namespace check reads before the fix in cilium/cilium#45693. Moving into the mode garbage-collects the Issuer and Certificate objects the controller owned. The TLS Secrets they issued stay behind: cert-manager runs with enableCertificateOwnerRef false, so a Certificate does not own the Secret it issued into. Every mode transition already behaves that way. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix two related bugs in the Gateway API route allowedRoute logic where multi-listener Gateways produce incorrect
Acceptedconditions on routes. This is a follow up of #44889.This PR was prepared with AIL:3. I personally reviewed each line of the submission as well as run regression tests from https://github.com/eufriction/k8s-cilium-gapi#test-results-by-version.
See each commit for description of the changes.
Fixes: #42159
Fixes: #45559