Repository navigation
v1.19: backport gateway-api fixes - #46826
Conversation
|
/test |
|
@0xch4z FYI the release tooling doesn't handle multi-line release notes well. Actually, for backports the standard tooling will instead add a section like this to the PR, and this will cause the release notes to show up correctly: Could you update the PR description to include this, and drop the release note section? Thanks! |
|
@cilium/sig-servicemesh would be good for one of you to review this, particularly the patches with conflicts |
There was a problem hiding this comment.
Currently working on a complete review. This is the most notable thing so far.
Because this is missing cb05729f33#diff-bd6864af98902e6616a2162225ab9a00a74010b41a9d245cddc615c732fe1001R240, the per-port listeners change would have no effect, and instead silently drop traffic for one of the ports.
|
I am a bit confused by this test, and wondering if we need to correct the behavior on main. The purpose of the commit is to reject same-port listener conflicts. However, the test output data tests that those conflicted listeners end up listening. The status writes appear to be correct, and appear in the output data (for example Programmed=False) https://github.com/0xch4z/cilium/blob/de555016ac13d847fe362930d87a4ffb2ceeb6d7/operator/pkg/gateway-api/testdata/gateway/tlsroute-mixed-protocol-listeners/output/gateway-tlsroute-mixed.yaml#L97-L116 However, the CEC output continues to include the 443 listener (meaning in practice Programmed=True). https://github.com/0xch4z/cilium/blob/de555016ac13d847fe362930d87a4ffb2ceeb6d7/operator/pkg/gateway-api/testdata/gateway/tlsroute-mixed-protocol-listeners/output/cec-gateway-tlsroute-mixed.yaml This seems to me like another issue caused by our lack of a consistent parsing, validation and pruning pipeline. This will be addressed in the future by #46681, but modifying translation is the last phase of the implementation (which will be merged into main as a series of patches). So, we probably need a separate fix for this on main in the meantime. Otherwise, the backport looks like a correct backport of the functionality. |
|
@asauber Currently on holiday with stochastic availability for computer time. From a brief look, the second link you provided include plain HTTP and only one TLS listener. For the changes from #44889 to trigger, the idea was that there needs to be at least two of either HTTPS and TLS. The plan was to also add plain HTTP to the same code path and remove the old path but I haven’t started on that as I’m unsure of the implications of #46681 and in what order the project would want things to happen. See #46681 (comment) for the question. If needed, I can try to perform a deeper analysis during the weekend. |
|
If you're on holiday, don't worry about it until you're back, enjoy!
I will take another look. Thanks for the comments
…On Fri, Jul 3, 2026 at 9:58 PM eufriction ***@***.***> wrote:
*eufriction* left a comment (cilium/cilium#46826)
<#46826 (comment)>
@asauber <https://github.com/asauber> Currently on holiday with
stochastic availability for computer time. From a brief look, the second
link you provided include plain HTTP and only one TLS listener. For the
changes from #44889 <#44889> to
trigger, the idea was that there needs to be at least two of either HTTPS
and TLS.
The plan was to also add plain HTTP to the same code path and remove the
old path but I haven’t started on that as I’m unsure of the implications of
#46681 <#46681> and in what order
the project would want things to happen. See #46681 (comment)
<#46681 (comment)>
for the question.
If needed, I can try to perform a deeper analysis during the weekend.
—
Reply to this email directly, view it on GitHub
<#46826?email_source=notifications&email_token=AAPTWHQ4SSKRNGE4E6RHEO35C6UYJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBXGY2TMNJZG4ZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4876565972>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPTWHS3MNUV4OYRZACI3TD5C6UYJAVCNFSNUABEKJSXA33TNF2G64TZHM2DQMJQHEZDGOJ3JFZXG5LFHM2DOOBSGEZDENBUG2QXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAPTWHQA3FQT3QKTYKYENFD5C6UYJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBXGY2TMNJZG4ZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AAPTWHRWQM46KE64VT4YXUL5C6UYJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBXGY2TMNJZG4ZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@eufriction thanks for looking through! @asauber I've added #45949 to this backport and validated the datapath for the gateway-multi-port-https and gateway-cross-protocol-same-hostname fixtures in a cluster locally. manifestsGateway with 2 https listeners, same host, different ports. Each frontend get its own L7LB proxy port: Gateway with tls (passthrough) listener and https listener, same host. |
|
/test |
|
@eufriction I've opened a separate issue to track the exact case that I'm concerned about. It can be easily reproduced, but as you mention, requires another "auxiliary" listener to be present in order for Envoy to be programmed and demonstrate the bug. For now, let's consider it a separate issue #46917 |
asauber
left a comment
There was a problem hiding this comment.
LGTM. Let's continue backporting related tests as they are introduced.
[ upstream commit 23f4146 ] Fixes: cilium#43881 Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 27ccab0 ] Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 3747408 ] Signed-off-by: Martin Lindberg <[email protected]>
|
@0xch4z there are some file conflicts and the PR can't be merged as is. |
[ upstream commit 4368970 ] 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]>
[ upstream commit f334eb4 ] 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]>
[ upstream commit 0ac732c ] The Gateway API ingestion layer appends a TLSPassthroughListener for every listener regardless of protocol, so IsTLSPassthroughListenerConfigured() and TLSPassthroughPorts() need to check len(l.Routes) > 0 rather than just testing whether the slice is non-empty. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 61cf6e5 ] Add HTTPSPortsSorted(), NeedsPerPortHTTPSListeners(), IsHTTPSPortConfigured(), TLSListenerRef, and TLSSecretsToListeners(). No callers yet, preparing for next steps Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 3384426 ] [ Backporter's notes: Minor conflicts due to authFilters not being present on VirtualHostParameters. ] Previously all HTTPS routes were bucketed under a single "secure" key, so listeners on different ports (e.g. 443 and 50051) shared one RouteConfiguration. Split the key by numeric port, gated on NeedsPerPortHTTPSListeners() so single-port Gateways and Ingress are unchanged. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 4f1d3fa ] Golden inputs and expected outputs for a Gateway with HTTPS listeners on ports 443 and 50051 sharing a hostname and TLS secret. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 5e73484 ] [ Backporter's notes: Conflicts due to missing httproute-backendtlspolicy-* tests on v1.19. and SDS secretes not namespaced as expected in testdata for gateway-multi-port-https test. ] Exercises a Gateway with HTTPS listeners on ports 443 and 50051 sharing a TLS secret. Verifies per-port listener splitting produces separate CiliumEnvoyConfig resources and correct Gateway/Route status conditions. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit e9b780a ] Emit a separate Envoy Listener per TLS passthrough port when per-port mode is active, preventing filter chain collisions on shared hostnames. Refactor TLS passthrough filter chain helpers to support port-scoped generation. Split ServiceListener entries per TLS passthrough port. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 4a80c9b ] Add NeedsCrossProtocolSplit() to trigger per-port splitting when HTTPS and TLS passthrough would produce identical Envoy ServerNames matchers. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit a64e748 ] [ Backporter's notes: Some conflicts due to differing signatures of isAllowed, isAttachable, GatewayAPI in operator/pkgs/gateway-api/helpers.go and operator/pkg/model/ingestion/gateway.go ] Use helpers.IsListenerNamespaceAllowed() for HTTPRoute, GRPCRoute, and TLSRoute ingestion. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 42a9bc9 ] Exercises a Gateway combining multi-port HTTPS and multi-port TLS passthrough listeners on distinct ports with disjoint hostnames. Validates per-port listener splitting, service mapping, and status conditions. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 33be339 ] Exercises a Gateway where HTTPS (port 443) and TLS passthrough (port 9443) share the same hostname. Verifies per-port listener separation, preventing Envoy filter chain collisions. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit fc64c19 ] Exercises a Gateway with two HTTPS listeners sharing a hostname where one restricts routes to Same namespace and the other allows All. A cross-namespace route is excluded from the restricted listener's route config while accepted on the open listener. Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 51ebb84 ] Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit cb05729 ] [ Backporter's notes: Dropped patches for DeepEqual and RequiresZoneUpdate as commits 2a04076 and 88ce4cc that introduced them are not present in v1.19 tree. ] processCEC stored one ProxyRedirect per service name. When multi-port Gateways produced two ServiceListener entries for the same service the second overwrote the first, leaving one port without an L7 redirect in the BPF LB map. Change Service.ProxyRedirect to ProxyRedirects ([]*ProxyRedirect) and resolve per frontend via ProxyRedirects.ForPort(). Signed-off-by: Martin Lindberg <[email protected]>
[ upstream commit 3ee0933 ] ProxyRedirects.ForPort prefers an exact port match over a wildcard (empty Ports) fallback. A single pass returns immediately on an exact match and tracks the first wildcard to return at the end. Signed-off-by: Martin Lindberg <[email protected]>
0204ac0 to
906e6fe
Compare
|
/test |
|
@aanm I've rebased and re-validated from my previous comment. |
Relates to bf03ce5. This patch is a continuation of the secret cleanup for newly added gateway-api golden tests after the merge of cilium#46826 (which was rebased just before bf03ce5). Signed-off-by: Charlie Kenney <[email protected]>
|
@aanm @joestringer rebase just missed bf03ce5, CI failed on merge. 😓 I've opened a PR with fixes for the new tests: #47229 |
Once a fixture is run with `hostNetwork = true` all following fixtures are run with `HostNetworkConfig.Enabled = true`. I found this bug while rebasing cilium#46826. The ordering of the gatewayclassconfig-nodeport test is fragile, it would pass if it came after the hostNetwork tests but fail when run on it's own or before. With this fix the test will fail again. Signed-off-by: Charlie Kenney <[email protected]>
Relates to bf03ce5. This patch is a continuation of the secret cleanup for newly added gateway-api golden tests after the merge of cilium#46826 (which was rebased just before bf03ce5). Signed-off-by: Charlie Kenney <[email protected]>
Backports the following PRs to
v1.19: