Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle conflicting service ports when merging per MCS spec #1645

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

tpantelis
Copy link
Contributor

@tpantelis tpantelis commented Sep 24, 2024

The spec states that if the properties of service ports between clusters don't match, the clusterset service should expose the union of the ports. We're doing this however we're not properly handle conflicts as per the spec. If multiple clusters have a matching port by name but the other properties don't match, it should be considered a conflict and the conflict resolution policy should be applied, ie the port from the cluster with the oldest export timestamp should be used. When merging, we need to sort the ports by cluster timestamp and use just the port name when computing the union rather than all the port properties as we did before.

Also when checking for conflicts, we should also check the AppProtocol property.

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr1645/tpantelis/port_merge
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

The spec states that if the properties of service ports between
clusters don't match, the clusterset service should expose the union
of the ports. We're doing this however we're not properly handle
conflicts as per the spec. If multiple clusters have a matching port
by name but the other properties don't match, it should be considered
a conflict and the conflict resolution policy should be applied, ie the
port from the cluster with the oldest export timestamp should be used.
When merging, we need to sort the ports by cluster timestamp and use
just the port name when computing the union rather than all the
port properties as we did before.

Also when checking for conflicts, we should also check the AppProtocol
property.

Signed-off-by: Tom Pantelis <[email protected]>
@yboaron yboaron added the ready-to-test When a PR is ready for full E2E testing label Sep 30, 2024
@tpantelis tpantelis enabled auto-merge (rebase) September 30, 2024 13:57
@tpantelis tpantelis merged commit 3136b91 into submariner-io:devel Sep 30, 2024
23 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr1645/tpantelis/port_merge]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-test When a PR is ready for full E2E testing
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants