Skip to content
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

Cloudflare provider can't handle multiple records. #314

Closed
kevincox opened this issue Aug 10, 2017 · 8 comments
Closed

Cloudflare provider can't handle multiple records. #314

kevincox opened this issue Aug 10, 2017 · 8 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@kevincox
Copy link

The cloudflare providor misbehaves if a service has multiple external IP addresses. For example if you have a single existing (managed) records it will replace the record with the other each iteration.

1 existing 2 current case.

1.You have an ingress with external IPs 1.1.1.1 and 2.2.2.2.

  1. 1.1.1.1 is an A record in cloudflare.
  2. external-dns notices you already have 1.1.1.1 and tries to update the record to have 2.2.2.2.
  3. The 1.1.1.1 record gets replaced with 2.2.2.2.
  4. You now have only 2.2.2.2 in cloudflare.
  5. external-dns noticies you have 2.2.2.2 in cloudflare and tries to update the record to have 1.1.1.1.
  6. Go back to step 2.

You will have correct IPs now, but only one at a time.

2 existing 2 current case.

1.You have an ingress with external IPs 1.1.1.1 and 2.2.2.2.

  1. 1.1.1.1, and 9.9.9.9 are A records in cloudflare.
  2. external-dns notices you already have 1.1.1.1 and tries to update the record to have 2.2.2.2 and remove 9.9.9.9
  3. The 1.1.1.1 record gets replaced with 2.2.2.2, 9.9.9.9 is untouched.
  4. external-dns notices you already have 2.2.2.2 and tries to update the record to have 1.1.1.1 and remove 9.9.9.9
  5. The 2.2.2.2 record gets replaced with 1.1.1.1, 9.9.9.9 is untouched.
  6. Go back to step 2.

This case is worse, you always have one correct IP, but the incorrect IP never gets removed.

Note: I haven't tested other providers so it might be a wider problem.

cc: @njuettner

@ideahitme
Copy link

ideahitme commented Aug 16, 2017

I don't think problem is specific to cloudflare and probably applicable to all cloud providers (the error is caused by erroneous internal external-dns logic). External DNS does not support multiple targets (i.e. case when one service/ingress generates more than one endpoint) and hence the problem. Related PRs and issues: #243, #270)

However, this problem can be caused also by creating two ingresses/services requesting same DNS name, as addressed and described here: #261, #258

I am closing this as this is a duplication, please comment if u disagree

@cusspvz
Copy link

cusspvz commented Oct 31, 2018

This shouldn't be closed since support for multiple targets was added but we still don't have support for multiple records handling/set on cloudflare.

We're only setting the first item of the target's array: https://github.com/kubernetes-incubator/external-dns/blob/74de102a130018052dc6551955fd1c12b0e1fc84/provider/cloudflare.go#L299

@cusspvz
Copy link

cusspvz commented Nov 2, 2018

@ideahitme can you please reopen this?

@linki linki reopened this Nov 2, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 26, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 28, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 27, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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.

lou-lan pushed a commit to lou-lan/external-dns that referenced this issue May 11, 2022
* Clean up stale krew installations on windows

This introduces a preRun check to root cmd. On windows, we determine the
current version of krew from the installation receipt and clean all other
directories in $KREW_ROOT/store/krew that aren't the current version,
since we don't delete the install directory on post-upgrade if plugin
name=="krew" (due to inability of deleting currently executed binary on
win32).

Signed-off-by: Ahmet Alp Balkan <[email protected]>

* add TestCleanupStaleKrewInstallations

Signed-off-by: Ahmet Alp Balkan <[email protected]>

* fix lint error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants