-
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
OCPBUGS-819: Azure provider - add wildcard replacement for TXT records #171
OCPBUGS-819: Azure provider - add wildcard replacement for TXT records #171
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alebedev87 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 |
Infoblox temporary licences had to be renewed /retest |
/assign |
@alebedev87 please add a JIRA so this can be tracked and tested. |
/assign @Miciah |
@alebedev87: This pull request references Jira Issue OCPBUGS-819, which is invalid:
Comment In response to this:
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/test-infra repository. |
/jira refresh |
@alebedev87: This pull request references Jira Issue OCPBUGS-819, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
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/test-infra repository. |
260e70d
to
ae718d5
Compare
What happens when a route or service with the host name "*.foo" exists and another route or service with the host name "ws.foo" is created? What happens in the reverse case: something with "ws.foo" exists and something with "*.foo" is created? CoreDNS and SkyDNS treat "any" the same as "*", so we could use that instead of "ws", but "any" isn't standard. It doesn't seem like there is any value we can use in lieu of "ws" that wouldn't risk causing conflicts. |
A conflict of the TXT record name would happen, in both cases. So, external-dns would reject the creation of the conflicting TXT record which would prevent the creation of the "target" DNS record too.
Even if it's not standard, |
ae718d5
to
58836fe
Compare
@alebedev87: all tests passed! Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
@@ -363,6 +364,9 @@ func (b *externalDNSContainerBuilder) fillAzureFields(zone string, container *co | |||
// https://github.com/kubernetes-sigs/external-dns/issues/2082 | |||
container.Args = addTXTPrefixFlag(container.Args) | |||
|
|||
// https://github.com/kubernetes-sigs/external-dns/issues/2922 | |||
container.Args = append(container.Args, fmt.Sprintf("--txt-wildcard-replacement=%s", defaultTXTWildcardReplacement)) |
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.
Do you think it would be better to limit this option only for configv1.AzurePlatformType
? Smaller blast radius? Or do you think it's better to be consistent for all platforms?
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.
Whoops, cancel that, I didn't realize the function was specific to the Azure provider already.
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.
Yes, this PR aims at fixing the problem which is seen only in Azure DNS as it doesn't allow wildcard records (TXT included) which don't start with the asterisk.
Not sure if I completely understand this one. Say I want to make a wildcard TXT record for How can I still query |
@gcs278 : Thanks for having a look!
Yes, the wildcard itself is not impacted by
|
Per https://www.rfc-editor.org/rfc/rfc4592#section-2.1.1, the entire first label must be an asterisk for the record to be a wildcard record. Accordingly, external-dns only substitutes (source) or matches (source) for "*" if it is equal to the entirety of the first label. |
Oh okay, now I'm starting to understand. External DNS is creating TXT records to track what other DNS records it owns. And azure is rejecting TXT records with But one thing I'm still confused about, is how/why a record such as |
Yeah, |
|
Okay - that makes more sense now. I was curious why this was even a problem (aka let's just stop making invalid records). But now I know External DNS is making them. Okay yikes. Sounds like this is our best path forward at the moment, but @Miciah does bring up a good point about naming collisions. Correct me if I'm wrong, but you can't have I'm good with this, but I feel hesitant, so @Miciah could you |
You are right, @gcs278. These 2 records won't be able to be served by ExternalDNS on Azure. This is a limitation (not only in this downstream but upstream too) which I think is preferable over the regression in the support of the wildcard record which we are currently having. |
Please make sure to address this caveat with a release note. /lgtm |
/assign @quarterpin |
/assign @xenolinux Note this comment: #171 (comment) We need to mention the fact that wildcard TXT records get modified: asterisk is replaced with |
/assign @lihongan |
/label qe-approved |
/label docs-approved |
/label px-approved |
@alebedev87: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-819 has been moved to the MODIFIED state. In response to this:
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/test-infra repository. |
Since the addition of the new format of TXT records in external-dns
0.12.0
the TXT records are prepended with the type of the DNS record which doesn't comply with the standards of Azure DNS in case of the wildcards: the wildcard symbol (*
) has to be the leftmost one.Related issue: kubernetes-sigs/external-dns#2922