External-DNS Policy flagΒΆ

The behavior of the external-dns --policy flag is not documented in the external-dns docs. After looking at the code and experimentation the flags work like this:

Value

Description

sync

The sync between the registry and the hosted zone will not remove or alter existing records created outside of external-dns. (Which is something I was a little worried about and tested that it is safe for existing records)

upsert-only

Create new records and update them. Will not delete records if they are no longer required, so it will leave a mess.

create-only

Create new records, will not be able to update records or delete them.

The external-dns docs only ever give examples that use policy upsert-only and this is what I was using, but when I deleted Ingress objects I noticed the associated records were not getting removed, after changing the --policy flag to sync it removed the record and associated registry records (since I am using txt registry). I can also confirm that existing records not managed by external-dns are maintained.

level=info msg="Applying provider record filter for domains: [cetinich.net. .cetinich2.net.
level=info msg="Desired change: DELETE a-helloworld2.cetinich.net TXT [Id: /hostedzone/Z1111122234BBVVV]"
level=info msg="Desired change: DELETE helloworld2.cetinich.net A [Id: /hostedzone/Z1111122234BBVVV]"
level=info msg="Desired change: DELETE helloworld2.cetinich.net TXT [Id: /hostedzone/Z1111122234BBVVV]"
level=info msg="3 record(s) in zone cetinich.net. [Id: /hostedzone/Z1111122234BBVVV] were successfully updated"
level=info msg="Desired change: DELETE a-helloworld2. TXT [Id: /hostedzone/Z111148384VVVVVVVVV]"
level=info msg="Desired change: DELETE helloworld2.cetinich2.net A [Id: /hostedzone/Z111148384VVVVVVVVV]"
level=info msg="Desired change: DELETE helloworld2.cetinich2.net TXT [Id: /hostedzone/Z111148384VVVVVVVVV]"
level=info msg="3 record(s) in zone cetinich2.net. [Id: /hostedzone/Z111148384VVVVVVVVV] were successfully updated"

Comments

comments powered by Disqus