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

Fix SRV records not returned for clusterset IP service #1681

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

tpantelis
Copy link
Contributor

With clusterset IP enabled, we extract the ports from the aggregated ServiceImport instead of the EndpointSlices. However the ports are populated in the ServiceImport sometime after creation so PutServiceImport needs to update the cached spec if it already exists.

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr1681/tpantelis/SRV_clusterset_ip
🚀 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.

@tpantelis tpantelis enabled auto-merge (rebase) November 22, 2024 17:20
@tpantelis tpantelis added the ready-to-test When a PR is ready for full E2E testing label Nov 22, 2024

t.lh.Resolver.PutServiceImport(si)

si.Spec.Ports = []mcsv1a1.ServicePort{port1, port2}
t.lh.Resolver.PutServiceImport(si)
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment here explaining why PutServiceImport needs to be called twice? I’m concerned that in a few months’ time someone might see this and remove the earlier PutServiceImport call since it appears redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the two calls from here as the scenario is handled in clusterip_service_test.go.


si.Spec.Ports = []mcsv1a1.ServicePort{port1, port2}
t.resolver.PutServiceImport(si)
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here.

With clusterset IP enabled, we extract the ports from the
aggregated ServiceImport instead of the EndpointSlices.
However the ports are populated in the ServiceImport sometime
after creation so PutServiceImport needs to update the
cached spec if it already exists.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
@tpantelis tpantelis merged commit dc9f67d into submariner-io:devel Nov 25, 2024
24 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr1681/tpantelis/SRV_clusterset_ip]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport backport-handled 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.

4 participants