-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
DNS SRV instancer doesn't deal well with missing port number #892
Comments
I find that strange; isn't an SRV record explicitly meant to contain a port? Can e.g. net.Dial possibly succeed without a one? |
Looks like if I name the port and look it up by name then I get the number; otherwise zero.
service definition:
|
And, in the case I want to work, I'm adding a port number before |
Do you think Kubernetes assumes you'll always try to connect to port 80 by default? Or maybe that it can elide port 80 if it's the only defined port for the service? As a test, could you try to do this with a service that has only one non-80 port defined, and a service with two ports defined? |
To be clear, I'm happy to adjust the behavior for this situation however makes sense. I'm just trying to figure out what makes sense :) |
Always zero if I try the bare name, |
So like... does Kubernetes expect you to know the port, and if so how? Or does it do the port routing for you, assuming you connect to 80 by default or something? |
I haven't researched those questions, and am unlikely to get to it soon. |
While I'm here, do you know if anyone's done an |
Not to my knowledge. |
It appears the Kubernetes DNS server will return 0 in the port number slot under some circumstances (most of the ones I tried), and
dnssrv/instancer.go
turns this into:0
on the address.Am I holding it wrong, or would you accept a PR to pass back the bare name if the port is 0?
The text was updated successfully, but these errors were encountered: