Skip to content

Conversation

giorio94
Copy link
Member

@giorio94 giorio94 commented Jul 31, 2025

The blamed commit reworked the storage of port information as part of the k8s.Backends structure, with the goal of reducing allocations. However, unnamed ports are handled differently, which down the line broke the propagation of services via clustermesh, when associated with unnamed ports, as incorrectly ignored.

Let's get this fixed by uniforming the handling, and adding appropriate filtering to remove the unnamed port entry where appropriate, to preserve the existing behavior. Additionally, let's extend the service synchronization script test, to prevent future regressions.

Fixes: 12ae78b ("k8s,loadbalancer: Optimize 'k8s.Backend.Ports' to reduce allocations")

clustermesh: fix regression preventing global services with unnamed ports from including remote backends

The blamed commit reworked the storage of port information as part of
the k8s.Backends structure, with the goal of reducing allocations.
However, unnamed ports are handled differently, which down the line
broke the propagation of services via clustermesh, when associated
with unnamed ports, as incorrectly ignored.

Let's get this fixed by uniforming the handling, and adding appropriate
filtering to remove the unnamed port entry where appropriate, to
preserve the existing behavior. Additionally, let's extend the service
synchronization script test, to prevent future regressions.

Fixes: 12ae78b ("k8s,loadbalancer: Optimize 'k8s.Backend.Ports' to reduce allocations")
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 requested review from a team as code owners July 31, 2025 13:45
@giorio94 giorio94 added kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Jul 31, 2025
@giorio94 giorio94 requested a review from dylandreimerink July 31, 2025 13:45
@giorio94 giorio94 added backport/author The backport will be carried out by the author of the PR. needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Jul 31, 2025
@giorio94 giorio94 requested review from marseel, tklauser and joamaki July 31, 2025 13:45
@giorio94
Copy link
Member Author

/test

@giorio94 giorio94 added dont-merge/bad-bot To prevent MLH from marking ready-to-merge. and removed dont-merge/bad-bot To prevent MLH from marking ready-to-merge. labels Jul 31, 2025
@giorio94 giorio94 added this pull request to the merge queue Jul 31, 2025
Merged via the queue into cilium:main with commit 7d22d84 Jul 31, 2025
84 of 85 checks passed
@giorio94 giorio94 deleted the mio/fix-global-service-unnamed-port branch July 31, 2025 16:56
@giorio94 giorio94 mentioned this pull request Aug 1, 2025
1 task
@giorio94 giorio94 added backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. and removed needs-backport/1.18 This PR / issue needs backporting to the v1.18 branch labels Aug 1, 2025
@github-actions github-actions bot added backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. and removed backport-pending/1.18 The backport for Cilium 1.18.x for this PR is in progress. labels Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/author The backport will be carried out by the author of the PR. backport-done/1.18 The backport for Cilium 1.18.x for this PR is done. kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants