Commit Graph

5 Commits

Author SHA1 Message Date
Thibault Jamet
b2ff1619f5
Add Domain filter interface 2024-08-14 10:20:59 +02:00
Thibault Jamet
82c6983fa3
Add a log line when no changes on cache provider
Change-Id: I13da2aa28eef3e2c8e81b502321c4dc137087b2d
2024-08-14 10:20:59 +02:00
Thibault Jamet
eb07eb9905
Add licence headers
Change-Id: I3f4646cabd66216fd028fbae3adf68129a8a2cbf
2024-08-14 10:20:59 +02:00
Thibault Jamet
29191e2362
Skip apply empty changes in the cache provider
Change-Id: Icaf1ffe34e75c320d4efbb428f831deb8784cd11
2024-08-14 10:20:58 +02:00
Thibault Jamet
089744c6ff
Add cache at provider level
**Description**

In the current implementation, DNS providers are called to list all
records on every loop. This is expensive in terms of number of requests
to the provider and may result in being rate limited, as reported in 1293
and 3397.

In our case, we have approximately 20,000 records in our AWS Hosted Zone.
The ListResourceRecordSets API call allows a maximum of 300 items per call.
That requires 67 API calls per external-dns deployment during every sync period

With this, we introduce an optional generic caching mechanism at the provider
level, that re-uses the latest known list of records for a given time.

This prevents from expensive Provider calls to list all records for each
object modification that does not change the actual record (annotations,
statuses, ingress routing, ...)

This introduces 2 trade-offs:

1. Any changes or corruption directly on the provider side will be
longer to detect and to resolve, up to the cache time

2. Any conflicting records in the DNS provider (such as a different
external-dns instance) injected during the cache validity will cause
the first iteration of the next reconcile loop to fail, and hence add a
delay until the next retry

**Checklist**

- [X] Unit tests updated
- [X] End user documentation updated

Change-Id: I0bdcfa994ac1b76acedb05d458a97c080284c5aa
2024-08-14 10:20:56 +02:00