-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: add support for externalDNS in sdk #1473
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Denis Tingaikin <[email protected]>
bb6e3ec
to
7c60f7c
Compare
Signed-off-by: Denis Tingaikin <[email protected]>
4d6c93b
to
9586b9f
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1473 +/- ##
=======================================
Coverage ? 70.43%
=======================================
Files ? 248
Lines ? 11185
Branches ? 0
=======================================
Hits ? 7878
Misses ? 2806
Partials ? 501 ☔ View full report in Codecov by Sentry. |
func TestInterdomainNetworkServiceRegistryWithDifferentDNSScheme(t *testing.T) { | ||
t.Cleanup(func() { goleak.VerifyNone(t) }) | ||
|
||
ctx, cancel := context.WithTimeout(context.Background(), time.Hour*10) |
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.
Should we use 5s timeout?
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.
thanks fixed
pkg/tools/sandbox/fake_resolver.go
Outdated
@@ -40,8 +49,7 @@ func NewFakeResolver() dnsresolve.Resolver { | |||
// AddSRVEntry adds a DNS record to r using name and service as the |
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.
minor: please fix func description
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.
thanks fixed
Signed-off-by: Denis Tingaikin <[email protected]>
Am I reading this correctly that this PR is making it possible to set the resolver options to be able to test in sandbox? Do we anticipate these changes being used for non-testing cases? |
@edwarnicke The resolver options will be used in registry-proxy-dns to work with externalDNS. Currently, registry-proxy-dns could work only with k8s cluster DNS. For example, we're supporting discovery in format With those options we also will support discovery in format |
OK... I'm a little confused. registry-proxy-dns should be looking up an SRV record via DNS for whatever the domain is. If he network service registry domain is @finance.example.com, it should be looking up:
(I've forgotten what the string we use for that last part is, but it should be something to indicate that our service is he nsm registry for that registry domain). So long as the K8s DNS delegates to global DNS, we shouldn't need to point to any other DNS. We should be using the same SRV record pattern to find a registry server no matter where things are running. |
@edwarnicke It could be diffecult for users whos use externalDNS to make the same scheme as we have with Coredns + k8s_external plugin At this moment we're working fine with entries
But what if registry service has another name?
The patch in this PR allows to configure services that we're looking |
That's the point of an SRV record, the
If you can set the SRV record in finance.example.com for
I would expect you would be able to set the SRV record in finance.example.com for:
If there's an existing _nsm_registry for the finance.example.com domain, and you want a different one, the right solution is to create a subdomain my.finance.example.com and create an SRV record for it:
All of that said... I don't understand what this has to do with external DNS... the "_nsm_registry" part should be the same whether we are running in the cluster or not. Am I missing something? |
Description
Issue link
networkservicemesh/deployments-k8s#5435
How Has This Been Tested?
Types of changes