source/crd: allow SRV targets with trailing dot in DNSEndpoint#6383
source/crd: allow SRV targets with trailing dot in DNSEndpoint#6383SAY-5 wants to merge 1 commit intokubernetes-sigs:masterfrom
Conversation
The DNSEndpoint CRD validator warned and skipped SRV targets that ended with a trailing dot, telling the user to remove it. Dropping the dot satisfied crd.go's default branch, but then Endpoint.ValidateSRVRecord(Targets) rejected the endpoint in CheckEndpoint because RFC 2782 requires the target host to be an absolute FQDN with a trailing dot. Users who tried to create an SRV record via a DNSEndpoint CRD ended up in a loop between both errors (kubernetes-sigs#6357). Treat SRV like CNAME in the crd.go validator: the SRV record format is <prio> <weight> <port> <host> and ValidateSRVRecord already enforces the trailing dot, so crd.go should accept it here. Fixes kubernetes-sigs#6357. Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
|
Invalid commit message issues detected Invalid commit messagesKeywords which can automatically close issues and hashtag(#) mentions are not allowed.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @SAY-5. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Description
The DNSEndpoint CRD validator warned and skipped SRV targets that ended with a trailing dot, telling the user to remove it. Dropping the dot satisfied
source/crd.go's default branch, but thenEndpoint.ValidateSRVRecordrejected the endpoint inCheckEndpointbecause RFC 2782 requires the target host to be an absolute FQDN with a trailing dot. The net effect: SRV records could not be created via a DNSEndpoint CRD — the user looped between both errors.Fix
Treat SRV like CNAME in the crd.go validator. The SRV record format is
<prio> <weight> <port> <host>andValidateSRVRecordalready enforces the trailing dot on the host, so crd.go should accept it and let the downstream validator decide.Fixes
Fixes #6357
Checklist
go test ./source/...green (including CRD suite).go buildclean.gofmtclean.Signed-off-by: SAY-5 SAY-5@users.noreply.github.com