Skip to content

Conversation

MrFreezeex
Copy link
Member

@MrFreezeex MrFreezeex commented Jan 7, 2025

This commit pass down the targetPort in a MCS-API derived Service from the local Service. We only need targetPort for local Endpoints so we do not need to globally sync this as ports are synced from endpoints on remote clusters that already account for targetPort. Thus we just take the ports merged globally from the ServiceImport and add the context of the targetPorts if we need to on the local cluster.

This also clarifies the EndpointSlice sync on target port as the targetPort field is now available into the slim Service copy done by Cilium be we shouldn't actually use it as targetPort may be a string and we do not have this info from remote clusters.

Fixes: #36735

clustermesh: add support for targetPort in MCS-API

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 7, 2025
@MrFreezeex MrFreezeex force-pushed the target-port branch 2 times, most recently from 4b77167 to 374fcf6 Compare January 8, 2025 17:22
@MrFreezeex
Copy link
Member Author

/test

@MrFreezeex MrFreezeex marked this pull request as ready for review January 8, 2025 18:15
@MrFreezeex MrFreezeex requested a review from a team as a code owner January 8, 2025 18:15
@MrFreezeex MrFreezeex requested a review from giorio94 January 8, 2025 18:15
@MrFreezeex
Copy link
Member Author

/test

Copy link
Member

@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, and sorry for the delay in the review.

Overall makes sense to me. Please see the comment inline about the potential issue with the pointers to slice elements.

@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. area/clustermesh Relates to multi-cluster routing functionality in Cilium. needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch labels Jan 16, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jan 16, 2025
@MrFreezeex
Copy link
Member Author

Thanks for the fix, and sorry for the delay in the review.

No worries, I am just aiming for the 1.17 release but apart from that I don't have any specific deadlines. Thanks again for your thorough review as always 🫡.

@MrFreezeex MrFreezeex requested a review from giorio94 January 17, 2025 14:22
Copy link
Member

@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! One alternative proposal that looks more straightforward to me, but feel free to ignore if you prefer the current one.

This commit pass down the targetPort in a MCS-API derived Service from the
local Service. We only need targetPort for local Endpoints so we do not
need to globally sync this as ports are synced from endpoints on remote
clusters that already account for targetPort. Thus we just take the ports merged
globally from the ServiceImport and add the context of the targetPorts if
we need to on the local cluster.

This also clarifies the EndpointSlice sync on target port as the targetPort
field  is now available into the slim Service copy done by Cilium be we
shouldn't actually use it as targetPort may be a string and we do not
have this info from remote clusters.

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
@MrFreezeex
Copy link
Member Author

/test

@MrFreezeex
Copy link
Member Author

/ci-eks

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 20, 2025
@julianwiedmann julianwiedmann added this pull request to the merge queue Jan 21, 2025
Merged via the queue into cilium:main with commit 45d638a Jan 21, 2025
63 of 64 checks passed
@rastislavs rastislavs mentioned this pull request Jan 21, 2025
45 tasks
@rastislavs rastislavs added backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. and removed needs-backport/1.17 This PR / issue needs backporting to the v1.17 branch labels Jan 21, 2025
@github-actions github-actions bot added backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. and removed backport-pending/1.17 The backport for Cilium 1.17.x for this PR is in progress. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clustermesh Relates to multi-cluster routing functionality in Cilium. backport-done/1.17 The backport for Cilium 1.17.x for this PR is done. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. 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.

clustermesh: followup on MCS-API not syncing target port
4 participants