-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(crd): txt record deletion #5280
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
base: master
Are you sure you want to change the base?
fix(crd): txt record deletion #5280
Conversation
|
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @arontsang! |
Hi @arontsang. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Thanks for this @arontsang 👍 |
I can try. But this PR is me popping my GoLang cherry.
I took an hour to setup the environment (after a few false starts).
…On Sun, 13 Apr 2025, 22:45 Michel Loiseleur, ***@***.***> wrote:
Thanks for this @arontsang <https://github.com/arontsang> 👍
Do you think you can add some tests on this ?
—
Reply to this email directly, view it on GitHub
<#5280 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA46MLIVMQ2B7BXFMMIDNCT2ZJZ63AVCNFSM6AAAAAB3AEW2UGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOJZHE4DCMJRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*mloiseleur* left a comment (kubernetes-sigs/external-dns#5280)
<#5280 (comment)>
Thanks for this @arontsang <https://github.com/arontsang> 👍
Do you think you can add some tests on this ?
—
Reply to this email directly, view it on GitHub
<#5280 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA46MLIVMQ2B7BXFMMIDNCT2ZJZ63AVCNFSM6AAAAAB3AEW2UGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOJZHE4DCMJRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Could you explain a little more what this code suppose to be doing? I do not understand it |
Sure @ivankatliarchuk The bug. https://github.com/kubernetes-sigs/external-dns/blob/master/registry/txt.go#L198 is failing to apply the labels for TXT records to the TXT endpoints. The result. https://github.com/kubernetes-sigs/external-dns/blob/master/controller/controller.go#L255 The cause. a) Old style TXT records come in on the same record as the target foo.acme.com TXT value [ 'FOOBAR', 'heritage=external-dns,....blah' ] Depending on which value is returned first, we end up with two different but equally broken behaviors.
Therefore we need to disable the creation of old style TXT records for TXT endpoints. Also disable fallback to old style when annotating TXT endpoints. b) New style TXT records are not recognized as being the heritage for the endpoint, because Ideally, someone updates this code to use the |
I will try to give it another shot. But from my integration tests it does not work. The whole issue is, we support legacy and new formats, as a result the TXT handling is not properly supported. Have you tried to do end-2-end testing and it works on your side? |
I've added comment in the issue #5254 (comment) |
I was debugging with a local cluster/docker with my own cloudflare account. Seems to work well with deleting TXT records. |
I also know that if the user has A/AAAA/CNAME records with the same name as the TXT records you are trying to create, my PR will not work. It ONLY works with the case where TXT names are different from the other records, OR "only new TXT" is enabled. Again, ideally, we inject the I suggested both that, and a change where PS, did you test the change with |
Indeed. It does not seems like CRD is care at all about this config. Seems like you have some other manifest that generates TXT record. As CRD simply does not support TXT from the code itself. |
This is it. The problem with TXT formats. There is a PR to simplify logic, #5172 but most likely is not going into master anytime soon (in fact I'm planning to close it, as there are pushbucks and folks happy to have this TXT mess). CRD and TXT is a problem for long time. Share all manifests. I could try once again. I'm testing on staging accounts where I have thousands of TXT recrods, not on fresh/empty |
44892d3
to
c1a18f3
Compare
hey @ivankatliarchuk Previously it was assumed that a TXT records is either a heritage/label entry, OR a TXT entry. We would only process the FIRST txt target for a TXT record into a label. I've now changed the logic to process ALL targets as labels, and then process the rest as a TXT entry. This means that we can use old style txt format with A/AAAA records together. |
/ok-to-test |
dbfbd31
to
c6653e0
Compare
c6653e0
to
cb58622
Compare
/retitle fix(crd): txt record deletion |
@ivankatliarchuk anything left on your side ? |
I could not approve. Both issues do not click to me. Overall I understand the direction, to have a better integration most likely with cert-manager or smth. From the code perspective it's seems like a breaking change. We use to process first Target, now we process all record targets. No integration tests before and after, unit tests not updated to cover a case. |
Let's keep it open. I'll asked one of the team working with to try on some close to real clusters. May takes few weeks |
Description
Adds support for deleting TXT records after the CRD is deleted.
Fixes #5254
Fixes #5279
Checklist