-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
🤖 Created branch: z_pr1681/tpantelis/SRV_clusterset_ip |
coredns/plugin/handler_test.go
Outdated
|
||
t.lh.Resolver.PutServiceImport(si) | ||
|
||
si.Spec.Ports = []mcsv1a1.ServicePort{port1, port2} | ||
t.lh.Resolver.PutServiceImport(si) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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>
68068c6
to
4357064
Compare
🤖 Closed branches: [z_pr1681/tpantelis/SRV_clusterset_ip] |
With clusterset IP enabled, we extract the ports from the aggregated
ServiceImport
instead of theEndpointSlices
. However the ports are populated in theServiceImport
sometime after creation soPutServiceImport
needs to update the cached spec if it already exists.