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

update TXT records with new owner on changing --txt-owner-id #2036

Closed
bartusz01 opened this issue Apr 1, 2021 · 8 comments · May be fixed by #4823
Closed

update TXT records with new owner on changing --txt-owner-id #2036

bartusz01 opened this issue Apr 1, 2021 · 8 comments · May be fixed by #4823
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@bartusz01
Copy link

bartusz01 commented Apr 1, 2021

What would you like to be added:
When changing --txt-owner-id on an existing external-dns resource, where --registry=txt and --policy=sync, it does not update the existing TXT records it owns, therefore losing ownership. Meaning that we have to manually delete the records in order to have external-dns take ownership again.

I would expect it to also change the ownership of existing records it previously owned in the DNS zone.

Why is this needed:
By default --txt-owner-id is set to default, if we change this value, the external-dns resource loses ownership of existing records it managed, because the TXT record is not updated with the new owner id.

@bartusz01 bartusz01 added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 1, 2021
@jgrumboe
Copy link
Contributor

jgrumboe commented Apr 5, 2021

This is a good description.
Right now, external-dns has not store or such a thing, therefore it doesn't know about former settings.
So we would need something like a "migration option" probably. For example an option like "--migrate-txt-prefix=default" could inform external-dns about an old txt-prefix. But there could be sophisticated cases like turning a txt-prefix to txt-suffix and the other way round.

@bartusz01
Copy link
Author

@jgrumboe Indeed, --txt-prefix has the same behaviour, losing ownership of records when changing this value.
Good idea about the "migration option". However, I think this would be better automated as external-dns could start storing this data, which would cause less confusion/maintenance for end users.

@jgrumboe
Copy link
Contributor

jgrumboe commented Apr 6, 2021

@bartusz01
Sorry, I was mixing up txt-owner with txt-prefix. (Facepalm) But the concept is the same. ;)

I wouldn't go for adding a store. External-dns is perfectly "stateless" (as long as you don't count the TXT records in DNS as storage). Persistent storage is always hard and adds complexity.
Since you (hopefully) don't wanna change txt-owner on an interval basis, it seems to be some kind of one-off task where it's feasible to add an argument and remove it after the job is done.

@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-contributor-experience at kubernetes/community.
/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 5, 2021
@k8s-triage-robot
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-contributor-experience at kubernetes/community.
/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 4, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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.

@Inorysky
Copy link

What would you like to be added: When changing --txt-owner-id on an existing external-dns resource, where --registry=txt and --policy=sync, it does not update the existing TXT records it owns, therefore losing ownership. Meaning that we have to manually delete the records in order to have external-dns take ownership again.

I would expect it to also change the ownership of existing records it previously owned in the DNS zone.

Why is this needed: By default --txt-owner-id is set to default, if we change this value, the external-dns resource loses ownership of existing records it managed, because the TXT record is not updated with the new owner id.

To solve this problem, I added the ability to update the original txt-owner by setting -- migrate-txt-owner to overwrite the old txt-owner. Set new txt-owner can cover the old txt-owner directly when using this tag.(--migrate-txt-owner)

#2466

Hopefully my code will help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
6 participants