external-dns keep updating record every 1 min for provider cloudflare and upsert-only policy.

Created on 21 Apr 2020  路  11Comments  路  Source: kubernetes-sigs/external-dns

What happened:
The external dns keeps update the A and TXT records every 1 min.

What you expected to happen:
It should create the new record once

How to reproduce it (as minimally and precisely as possible):
with the pod version 0.7.1

Anything else we need to know?:
The log is as below,
time="2020-04-20T23:34:31Z" level=info msg="Instantiating new Kubernetes client"
time="2020-04-20T23:34:31Z" level=info msg="Using inCluster-config based on serviceaccount-token"
time="2020-04-20T23:34:31Z" level=info msg="Created Kubernetes client https://10.63.240.1:443"
time="2020-04-20T23:34:34Z" level=info msg="Changing record." action=CREATE record=nodejs-v1-test.xxx.com.au targets=1 ttl=1 type=A zone=c33d817586faa7f1deb0a66b6b45a6d3
time="2020-04-20T23:34:35Z" level=info msg="Changing record." action=CREATE record=nodejs-v1-test.xxx.com.au targets=1 ttl=1 type=TXT zone=c33d817586faa7f1deb0a66b6b45a6d3
time="2020-04-20T23:35:34Z" level=info msg="Changing record." action=UPDATE record=nodejs-v1-test.xxx.com.au targets=1 ttl=1 type=A zone=c33d817586faa7f1deb0a66b6b45a6d3
time="2020-04-20T23:35:35Z" level=info msg="Changing record." action=UPDATE record=nodejs-v1-test.xxx.com.au targets=1 ttl=1 type=TXT zone=c33d817586faa7f1deb0a66b6b45a6d3
time="2020-04-20T23:36:34Z" level=info msg="Changing record." action=UPDATE record=nodejs-v1-test.xxx.com.au targets=1 ttl=1 type=A zone=c33d817586faa7f1deb0a66b6b45a6d3

Environment:

  • External-DNS version (use external-dns --version): 0.7.1
  • DNS provider: Cloudflare

I see a similar issue here,
https://github.com/kubernetes-sigs/external-dns/issues/883
https://github.com/kubernetes-sigs/external-dns/issues/879

With the version I don't have the issue with Google DNS but I have the issue with Cloudflare and using --policy=upsert-only

kinbug

Most helpful comment

OK, I found the issue and have a fix :tada: It's due to improper handling of the default value for external-dns.alpha.kubernetes.io/cloudflare-proxied

An immediate workaround is to explicitly specify the external-dns.alpha.kubernetes.io/cloudflare-proxied annotation on all of your resources. A better fix is coming in a PR :)

All 11 comments

this is a known problem as seen here already https://github.com/kubernetes-sigs/external-dns/issues/1463
fyi i can confirm using bitnami/external-dns:0.5.17 solved this issue at my end

actually my bad ..0.5.17 also has the issue :/

Be sure that you are passing
--txt-owner-id=mycluster

I am also experiencing this. However, I don't think that setting --txt-owner-id=mycluster is the answer; if the owner IDs did not match, then the DNS record would not be updated. Indeed, my TXT records show external-dns/owner=default, which matches the default flag value.

OK, I found the issue and have a fix :tada: It's due to improper handling of the default value for external-dns.alpha.kubernetes.io/cloudflare-proxied

An immediate workaround is to explicitly specify the external-dns.alpha.kubernetes.io/cloudflare-proxied annotation on all of your resources. A better fix is coming in a PR :)

A fix for this issue is in #1560 :)

This should be fixed as of 0.7.2, could you check?

It seems to work well with 0.7.2 - thanks 馃帀 I tested using the cloudflare provider.

Same here, no connection issues since the switch to 0.7.2 with Cloudflare + Proxy!

OK, I'll consider this fixed. If not, please create another issue with steps to reproduce, or ideally a test in cloudflare_test.go or other affected. The tests for cloudflare provider are really easy to write :)

/close

@sheerun: Closing this issue.

In response to this:

OK, I'll consider this fixed. If not, please create another issue with steps to reproduce, or ideally a test in cloudflare_test.go or other affected. The tests for cloudflare provider are really easy to write :)

/close

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.

Was this page helpful?
0 / 5 - 0 ratings