Commit Graph

85 Commits

Author SHA1 Message Date
Thibault Jamet
b2ff1619f5
Add Domain filter interface 2024-08-14 10:20:59 +02:00
tanujd11
f52cc1f1a8 fix: heritage txt record was not able to be created for txt record
Signed-off-by: tanujd11 <dwiveditanuj41@gmail.com>
2023-12-27 23:23:11 +05:30
Seweryn Chlewicki
66b5b250fa
Make the nonce stable when generating delete records 2023-10-05 20:07:41 +01:00
Kubernetes Prow Robot
e0405a2e60
Merge pull request #3748 from johngmyers/exclude-managed
Add --exclude-record-types flag
2023-09-18 22:37:49 -07:00
Kubernetes Prow Robot
f42e4fe854
Merge pull request #3910 from johngmyers/a-alias
Represent AWS Alias records as record type A
2023-09-18 12:08:57 -07:00
John Gardiner Myers
94713c20c6 Add --exclude-record-types flag 2023-09-15 18:45:09 -07:00
Kubernetes Prow Robot
7519a778dd
Merge pull request #3912 from Sewci0/fix/txt-registry-case
[TXT Registry] Fix `Records()` case handling
2023-09-14 22:50:20 -07:00
Kubernetes Prow Robot
bb705a146d
Merge pull request #3911 from johngmyers/adjust-err
chore(providers): allow AdjustEndpoints to return error
2023-09-14 22:50:12 -07:00
Kubernetes Prow Robot
030342f445
Merge pull request #3747 from cronik/bugfix/dual-stack-records
Fix planning for multi-cluster dual stack record types
2023-09-14 22:24:12 -07:00
Seweryn Chlewicki
a1d54ad0d7
[TXT Registry] Fix Records() case handling 2023-09-04 17:52:30 +01:00
John Gardiner Myers
c596611f9e Allow AdjustEndpoints to return error 2023-09-03 11:23:03 -07:00
John Gardiner Myers
ff7412a844 Represent AWS Alias records as record type A 2023-09-02 17:54:50 -07:00
Kyle Cronin
20bff0aae5 Remove EndpointFilterInterface 2023-08-16 23:48:30 -04:00
Kyle Cronin
7fb144d8d8 Fix planning for multi-cluster dual stack record types
When AAAA multi-target / dual stack support was
added via #2461 it broke ownership of domains across
different clusters with different ingress records types.

For example if 2 clusters manage the same zone,
1 cluster uses A records and the other uses CNAME
records, when each record type is treated as a separate
planning record, it will cause ownership to bounce back
and forth and records to be constantly created and
deleted.

This change updates the planner to keep track of multiple
current records for a domain. This allows for A and AAAA
records to exist for a domain while allowing record type
changes.

The planner will ignore desired records for a domain that
represent conflicting record types allowed by RFC 1034 3.6.2.
For example if the desired records for a domain contains
a CNAME record plus any other record type no changes for
that domain will be planned.

The planner now contains an owned record filter provided
by the registry. This allows the planner to accurately plan
create updates when there are record type changes between
the current and desired endpoints. Without this filter the
planner could add create changes for domains not owned
by the controller.
2023-08-15 19:37:50 -04:00
John Gardiner Myers
fe7e84f0a4 Use common EndpointKey type 2023-08-11 12:18:44 -07:00
Kubernetes Prow Robot
8623a2afc3
Merge pull request #3702 from johngmyers/provider-specific-2
Remove PropertyValuesEqual method from Provider interface
2023-08-11 10:43:26 -07:00
Kubernetes Prow Robot
380e8b6f5a
Merge pull request #3724 from Sewci0/fix/to-endpoint-name
[TXT Registry] Fix handling of records produced by `toNewTXTName` in `toEndpoint`
2023-08-10 14:01:25 -07:00
John Gardiner Myers
5affab0561 Remove PropertyValuesEqual method from Provider interface 2023-08-04 04:56:43 -07:00
Kubernetes Prow Robot
16b28d8afe
Merge pull request #3711 from johngmyers/domainfilter
Refactor Provider to require DomainFilter
2023-07-20 04:02:07 -07:00
Seweryn Chlewicki
8cd7c95124
Implement endpoint key 2023-07-14 17:33:13 +01:00
Seweryn Chlewicki
f04457dd86
Disable generation of old style txt records when using recordTypeInAffix 2023-07-14 17:16:05 +01:00
Seweryn Chlewicki
fa38920d37
Extract prefix and suffix to separate variables 2023-07-14 17:05:20 +01:00
Seweryn Chlewicki
e373685286
Merge branch 'fix/to-endpoint-name' of github.com:Sewci0/external-dns into fix/to-endpoint-name 2023-06-27 08:58:04 +01:00
Sewci0
480979b0d4
Update registry/txt.go
Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2023-06-27 08:57:57 +01:00
Seweryn Chlewicki
f2c08ac397
Add guardrails for AAAA records 2023-06-27 08:57:00 +01:00
Seweryn Chlewicki
74be95aca4
Simplify record type handling 2023-06-27 00:01:38 +01:00
Seweryn Chlewicki
0f14da0f15
Handle old format 2023-06-26 15:20:35 +01:00
Seweryn Chlewicki
013f8cf9e9
Fix TXT registry handling of NewTXT domains 2023-06-23 12:14:20 +01:00
John Gardiner Myers
43eea7fa9b Refactor Provider to require DomainFilter 2023-06-19 20:25:59 -07:00
John Gardiner Myers
bb4e7478b7 Address review comments 2023-06-18 16:50:02 -07:00
Matias Charriere
65e480df0e
remove hardcoded check in registry/txt
Signed-off-by: Matias Charriere <matias@giantswarm.io>
2023-06-18 13:58:16 +02:00
Matias Charriere
44b5761330
reimplement ForceUpdate using ProviderSpecific properties
Signed-off-by: Matias Charriere <matias@giantswarm.io>
2023-06-15 11:50:05 +02:00
Matias Charriere
1bd3834743
handle missing TXT records with a forcedUpdate strategy
This change tries to remove part of the logic added in 50f196c0db.
The forceUpdate strategy relies on existing code of the planner to migrate TXT records to the new format,
being the main goal to avoid conflicts during apply.

Signed-off-by: Matias Charriere <matias@giantswarm.io>
2023-06-15 11:50:04 +02:00
Viacheslav Sychov
2554f9f879 #1828: Support encrypted DNS txt records
Signed-off-by: Viacheslav Sychov <viacheslav.sychov@gmail.com>
2023-04-28 20:29:54 +02:00
John Gardiner Myers
781ee3d71f Address review comments 2023-04-12 22:46:39 -07:00
John Gardiner Myers
98532480b0 Support dual-stack domains in TXT registry 2023-03-30 17:49:31 -07:00
Alfred Krohmer
7dd84a589d Route53: retry single changes in a batch if the batch fails
If a single change fails during the retry, it will be added to a queue.
In the next iteration, changes from this queue will be submitted after
all other changes.

When submitting single changes, they are always submitted as batches of
changes with the same DNS name and ownership relation to avoid
inconsistency between the record created and the TXT records.
2023-01-16 16:03:16 +01:00
Ricardo Katz
708de4f98d Fix null pointer on generateTxtRecord 2023-01-06 14:03:17 -03:00
Kubernetes Prow Robot
644b880897
Merge pull request #3017 from olemarkus/ignore-invalid-endpoint
Don't create endpoint if attempting to create one with invalid dns name
2022-10-06 12:37:53 -07:00
Andy Bursavich
74ffff6c26 gofumpt 2022-09-20 20:48:57 -07:00
Ole Markus With
7dbf503fe1 Don't create endpoint if attempting to create one with invalid dns name 2022-09-10 12:31:13 +02:00
Andrey Lebedev
50f196c0db Handle the migration to the new TXT format: create missing records 2022-07-13 21:49:27 +02:00
Dinar Valeev
25c7cb28ea
Add additional txt record with record type marker
In order to track multiple record types with the same name, lets migrate
to new format, were record name contains record type in it.

Signed-off-by: Dinar Valeev <dinar.valeev@absa.africa>
2022-04-14 16:39:36 +02:00
Thibault Jamet
17fb8813d0
Reduce AWS Route53 API calls
Currently, planning instructs to create all records even
those which does not match any zone.
Later, those records will be checked towards the existing
records and filtered whether they match or not a hosted zone.

This causes a problem, at least in the specific case of the Route53
implementation as it always calls the ApplyChanges method, which in its
turn always retrieves all records in all zones.

This causes high pressure on Route53 APIs, for non-necessary actions.

By being able to filter all unmanaged records from the plan, we can
prevent from calling ApplyChanges when nothing has to be done and hence
prevent an unnecessary listing of records.

By doing so, the rate of API calls to AWS Route53 is expected to be
reduced by 2
2021-04-25 18:10:36 +02:00
Raffaele Di Fazio
f5aa1c4c37
Add new method to provider interface to implement provider specific changes (#1868)
* adds tests for shouldUpdateProviderSpecific

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* move AWS health to where it belongs

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* add test that breaks things

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* adds adjustendpoints method

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* fix controller

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* actually pass the provider where needed

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* OMG goland do your go fmt thing

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* use registry as proxy

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* make linter happy

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* change AdjustEndpoints signature

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* fix typo

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* actually use adjusted endpoints

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* revert cloudflare change

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* Update provider/cloudflare/cloudflare.go

Co-authored-by: Nick Jüttner <nick@juni.io>

Co-authored-by: Nick Jüttner <nick@juni.io>
2020-12-09 23:40:54 -08:00
dan.simone@oracle.com
07c8175f66 Call strings.ToLower() on wildcardReplacement 2020-09-25 15:32:57 -07:00
dan.simone@oracle.com
e3bac0fb55 Merge remote-tracking branch 'origing/master' into dansimone/support-wildcard-records
# Conflicts:
#	registry/txt.go
#	registry/txt_test.go
2020-09-01 11:24:44 -07:00
Chema Sanchez
73be02b155 Fix index out of range when hostname has no dots 2020-08-27 09:28:12 +02:00
dan.simone@oracle.com
9024b2ef81 Clarify wildcard parameter 2020-07-29 13:16:03 -07:00
dan.simone@oracle.com
b01daf5927 Support wildcard records - Optional ability to replace the asterisk in generated registry TXT records with another string 2020-07-29 12:01:33 -07:00