-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Correct format of SRV record for NodePort #1914
Conversation
@grimmy, please can you take a look if this change doesn't brake anything regarding NodePort support? |
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.
This would make sense to me, however I don't know if this breaks current usage? What if you have already existing SRV records with port usage for the record?
It might be worth mentioning that people might be surprised upgrading external-dns at some point.
I'd like to hear the opinion of the community if this would be ok or if we need to have a workaround when updating external-dns.
I believe we're safe in terms of backwards compatibility. SRV records don't work so far, so there shouldn't be an issue with existing records (covered in PR #1890) |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: njuettner, vanekjar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Currently, the NodePort extraction results in an SRV record with the DNS name in the following format:
Please note that the first part of the DNS name is the port. That defeats the purpose of the SRV record since the client needs to know the port number upfront to query for the record to "learn" the port again from the DNS server.
DNS RFC specifies that the SRV record should be in the following format (see https://en.wikipedia.org/wiki/SRV_record):
For that reason I replaced the port in the DNS name with the K8s Service name resulting in records with this format:
Checklist