Commit Graph

134 Commits

Author SHA1 Message Date
Megum1n
7d3d355175
Merge branch 'master' into aws-provider-validate-value-size 2024-02-07 16:27:36 +01:00
thiagoluiznunes
70835ab7bd feat(aws-provider): create flag to support sub-domains match parent
The current implementation of external-dns from sig-external-dns does
not support domain filtering (--domain-filter) for sub-domains on Route53,
such as test.sub-domain.domain.com. The function MatchParent was recently
removed from the base code, but it is still necessary for this purpose.
An example of a use case for this support is having a cluster per hosted
zone with a hundred ingress related to that zone with different variants of
sub-domains. With the matchParent function and zone-match-parent flag,
external-dns will now support an extended automatic match for sub-domains.
2024-02-06 10:33:01 -03:00
papaya kiwi
f9ee550912 fix(aws): allow alias records to be created when using the alias annotation 2024-01-14 23:17:50 +00:00
Sandor Szücs
e5f7e91c0c
fix: provide possibility to have a soft error mode to only log error and not fatal
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2024-01-12 20:34:02 +01:00
Megum1n
7f726e09f5
Remove unnecessary assignments 2024-01-12 00:22:48 +01:00
Sandor Szücs
1ee6c0a77d
fix: provide possibility to have a soft error mode to only log error and not fatal
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2024-01-09 22:13:24 +01:00
Megum1n
c711820c77
Bug fixes 2024-01-05 22:02:10 +01:00
Megum1n
822c2df06b
Skip change if it doesn't fit in any batch 2023-12-21 02:42:27 +01:00
Megum1n
c391f5588a
Validate AWS record values size during batch set generation 2023-12-19 10:21:47 +01:00
theloneexplorerquest
f18e66f83d update to add il-central-1 2023-12-05 23:21:28 +11: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
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
Shreyas Mhatre
c70e5f853e
Update aws.go for issue #3833 (#3834)
* Update aws.go for issue #3833

Fix to add ap-south-2 region to support elb and nlb

* Update provider/aws/aws.go

Added missing quotes

Co-authored-by: Raffaele Di Fazio <raffo@github.com>

* Update provider/aws/aws.go

Added missing quotes

Co-authored-by: Raffaele Di Fazio <raffo@github.com>

---------

Co-authored-by: Raffaele Di Fazio <raffo@github.com>
2023-09-01 07:54:43 -07:00
Justin Witrick
c00a24af55 aws: add ap-southeast-4 region
This change adds support for LB in ap-southeast-4
2023-08-28 10:31:19 -04:00
Avi Sharma
79987b308e Add AWS API gateway endpoint zoneId mappings
Signed-off-by: Avi Sharma <avi.08.sh@gmail.com>
2023-08-04 17:12:31 +05:30
Kubernetes Prow Robot
16b28d8afe
Merge pull request #3711 from johngmyers/domainfilter
Refactor Provider to require DomainFilter
2023-07-20 04:02:07 -07:00
Kubernetes Prow Robot
e602e049be
Merge pull request #3738 from Sewci0/adjust-aws-alias-ttl
[AWS] Adjust TTL for alias records
2023-06-28 04:08:30 -07:00
Seweryn Chlewicki
ce192181fb
Revert to recordTTL 2023-06-27 21:07:40 +01:00
Seweryn Chlewicki
0019d158dc
Unset instead 2023-06-27 17:49:58 +01:00
Seweryn Chlewicki
d18abe5f39
[AWS] Adjust TTL for alias records 2023-06-27 16:28:09 +01:00
John Gardiner Myers
43eea7fa9b Refactor Provider to require DomainFilter 2023-06-19 20:25:59 -07:00
John Gardiner Myers
794a10dfbe Use common code for creating AWS sessions 2023-06-18 16:47:37 -07:00
John Gardiner Myers
55bbb29f55 Route53 update configuration of target health checks 2023-06-09 17:11:28 -07:00
John Gardiner Myers
4b15f20e76 Simplify GetProviderSpecificProperty 2023-06-09 07:33:41 -07:00
John Gardiner Myers
f4756f8498 Remove unnecessary Route53 code 2023-06-08 15:51:25 -07:00
Kubernetes Prow Robot
9861507a4d
Merge pull request #3604 from baziliolg/baziliolg/eu-south-2
Add Canonical Hosted Zone IDs for ELB/NLB in eu-south-2 (Spain) AWS region
2023-05-16 05:39:36 -07:00
Maksym Pylypenko
65b1fd7131 Add Canonical Hosted Zone IDs for ELB/NLB in eu-south-2 (Spain) AWS region 2023-05-12 15:38:32 +03:00
Seweryn Chlewicki
205e8c0334
Add support for MX records in Azure, GCP and AWS 2023-03-30 20:32:32 +01:00
Jeff Wenzbauer
bd18299d58
Add AWS VPC endpoint canonical hosted zone IDs 2023-02-22 13:13:11 -07:00
jgourmelen
1d4939f02f enabled zurich endpoint 2023-02-09 13:13:32 +01:00
Bruno Leite Alves
0dc451d7de add ap-northeast-3 (Osaka) network balancer hosted zone ID to aws provider 2023-01-26 18:23:41 +01: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
Alfred Krohmer
adf6ad753f Route53: wrap route53.Change in preparation of retry mechanism 2023-01-16 16:03:03 +01:00
Jesse Gonzalez
2b28a334c9
test(aws/provider): Adding test for func requireDelteCreate(). 2023-01-10 00:12:48 -06:00
Jesse Gonzalez
6580182b79
refactor(provider/aws): Refactor createUpdateChanges() with helper requiresDeleteCreate() to see if change is UPSERT capable. 2023-01-09 22:55:19 -06:00
Jesse Gonzalez
2a92eb8085
fix: Support conversion from/to simple to/from other routing policies for the AWS provider. 2023-01-09 22:50:32 -06:00
Andrew Gleeson
be0cac346b chore add me-central-1 region 2022-12-06 11:42:44 +00:00
Raffaele Di Fazio
031347b078
Revert "fix: Support conversion from/to simple to/from other routing policies for the AWS provider." 2022-12-03 10:26:20 +01:00
Jesse Gonzalez
606ce34012 fix: Support conversion from/to simple to/from other routing policies for the AWS provider. 2022-11-15 00:52:25 -06:00
Andy Bursavich
74ffff6c26 gofumpt 2022-09-20 20:48:57 -07:00
Kubernetes Prow Robot
9e0a232c3a
Merge pull request #2758 from luke-plausin-kidsloop/fix/missing-regions-r53
Fix/missing regions r53
2022-09-15 09:05:23 -07:00
pg2000
91aaf6803d
Apply suggestions from code review 2022-08-19 17:25:47 +02:00
pg2000
ce38a40e2b
Apply suggestions from code review
Co-authored-by: Nick Jüttner <nick@juni.io>
2022-08-19 17:08:38 +02:00
pg2000
ff46c4067c
replace Id with ID
Co-authored-by: Steven E. Harris <seh@panix.com>
2022-06-27 20:56:55 +02:00
pg2000
ca99ed08eb
replace Id with ID
Co-authored-by: Steven E. Harris <seh@panix.com>
2022-06-27 20:56:46 +02:00
pg2000
4ace07f0a2
support ExternalID in AWS Provider when assuming a role 2022-06-15 18:49:31 +02:00
Luke Plausin
c01c7fe936 Update warning message 2022-05-13 14:47:43 +01:00
Luke Plausin
c623580ddf Revert order 2022-05-13 14:09:49 +01:00
Luke Plausin
fc3f630d53 Remove duplicate line 2022-05-13 13:12:26 +01:00
Luke Plausin
4add4439e5 Add a warning for new unsupported regions. 2022-05-13 10:02:42 +01:00
Luke Plausin
a4e0b54ef2 #2757 add missing regions Jakarta (ap-southest-3) and Milan (eu-south-1) 2022-05-13 09:55:19 +01:00
Nick Jüttner
e786f5bf60 fix 2022-02-13 13:19:36 +01:00
Jan Sandbrink
78fe201d1c Remove an obsolete TODO comment
This comment belonged to a switch-statement that
has since been removed, but it was forgotten to
remove the corresponding comment.
2022-02-09 09:21:41 +01:00
George Buckerfield
93b3cf95b6
Add the canonical hosted zone for Cloudfront 2021-11-12 15:19:07 +00:00
Tariq Ibrahim
1aef05c8e5
remove unused parameters in aws change submit method 2021-09-23 13:32:05 -07: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
Kubernetes Prow Robot
e2eefbec7b
Merge pull request #1860 from LogMeIn/aws-fix-alias-records
AWS Route 53 provider: fix various problems with handling of alias records
2021-04-07 00:51:53 -07:00
Alfred Krohmer
0d4cf9915c Address review comments 2021-04-05 21:37:13 +02:00
Thibault Jamet
d0120542ca
Use a constant 300 AWS page size 2021-03-24 11:15:02 +01:00
Steffen Pøhner Henriksen
4345ce6a31 AWS: fix handling of alias records 2021-03-22 14:38:15 +01:00
Thibault Jamet
6b8035e0ad
Increase AWS pagination size
From measurements, AWS by default has pagination of 100 items per
page when listing hosted zone resources.

This increases the number of requests required to list all our zones,
and pushes a hard constraint on the rate limits.

From the experiments, it seems that on the server-side, there is a hard
limit of 300 elements per page, as per AWS documentation:
https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListResourceRecordSets.html

> ListResourceRecordSets returns up to 300 resource record sets at a time in ASCII order,
> beginning at a position specified by the name and type elements

Hence raising the page size from 100 to 300 items would decrease by 3
the number of requests posted to Route53

We even set a higher limit so we can benefit from a lower number of
requests if ever AWS increases the hard limit of 300.
2021-03-12 12:01:50 +01:00
Joshua Stern
eba31ec0d8 Add support for aws eu-south-1 region 2021-02-18 12:54:33 -05: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
James Ravn
053d39f422
Allow AWS provider to change record types
Currently the AWS provider cannot handle record type changes. It always
attempts to UPSERT such updates, which will fail the entire zone batch
of changes. As a result, a single resource change can break all the
updates for the entire zone.

This change modifies the AWS behavior to correctly identify when the
record type changes and perform a batched DELETE and CREATE to update
the record successfully.

Special logic is required to handle ALIAS records which are not directly
encoded by the generic external-dns code, and relies on
convention (using a CNAME record type internally). I'm not sure this is
ideal as it's fairly error prone, and would prefer to see direct support
for such ALIAS types, but I've left it alone in this change.
2020-11-19 14:45:40 +00:00
Mic
83d95bf425 aws-r53 adding Africa (Cape Town) ELB endpoints and hosted zone id's 2020-10-20 16:33:14 +02:00
Rajat Jindal
625eaf4867 get healthcheckid whether set-identifier is set or not 2020-09-29 15:11:12 +05:30
Rajat Jindal
72544c38c3 allow setting healthCheckId when identifier not provided 2020-09-29 15:11:12 +05:30
Rajat Jindal
32b7452fbe allow to associate dns records with health checks 2020-09-29 15:11:12 +05:30
Benjamin Pineau
837d1ea248 aws: cache zones list
When it syncs AWS DNS with k8s cluster content (at `--interval`), external-dns submits two distinct Route53 API calls:
* to fetch available zones (eg. for tag based zones discovery, or when zones are created after exernal-dns started),
* to fetch relevant zones' resource records.

Each call taxes the Route53 APIs calls budget (5 API calls per second per AWS account/region hard limit), increasing the probability of being throttled.
Changing synchronization interval would mitigate those calls' impact, but at the cost of keeping stale records for a longer time.

For most practical uses cases, zones list aren't expected to change frequently.
Even less so when external-dns is provided an explicit, static zones set (`--zone-id-filter` rather than `--aws-zone-tags`).

Using a zones list cache halves the number of Route53 read API calls.
2020-09-03 13:03:07 +02:00
Vinny Sabatini
47f9fb1b27 utilize the errors package for AWS error handling 2020-08-24 21:57:01 -05:00
Kubernetes Prow Robot
84e6002297
Merge pull request #1549 from Reuuke/master
External DNS should uses ALIAS for AWS Global Accelerator
2020-08-20 00:37:23 -07:00
Benjamin Pineau
b64e3ac832 aws: errors with context
When faced with errors from cloud providers (like "Throttling: Rate exceeded"), it's not always easy to find what operation caused the failure, and what action was aborted, if any,

Let's make it easier to identify an error source (and affected object when possible) by providing more context (and by using easy to find error messages).
2020-08-14 12:54:28 +02:00
Kubernetes Prow Robot
102228c181
Merge pull request #1555 from OmerKahani/Change_Order_Delete_Before_Create
AWS: change the order of the actions, DELETE before CREATE fixes #1411
2020-06-10 08:20:51 -07:00
Nick Jüttner
d867582bf8 improve linter quality for external-dns 2020-06-06 22:35:05 +02:00
Nick Jüttner
3388e3ddf1 improve linter quality for external-dns 2020-06-06 22:29:24 +02:00
Kubernetes Prow Robot
25d71ea45a
Merge pull request #1536 from sheerun/property-comparator
Allow for custom property comparators
2020-06-01 03:07:55 -07:00
greenu
5be33906ff Fix incorrect ELB hostzones for AWS China 2020-05-25 15:42:50 +03:00
Calvin Huang
514c6e277a
update reference link with elb endpoints 2020-05-21 00:45:42 -07:00
Calvin Huang
6f07ea5ea6
Update Govcloud provider hosted zones
Fixes https://github.com/kubernetes-sigs/external-dns/issues/1550;
https://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region now has documentation for the Govcloud regions as well
2020-05-20 17:03:19 -07:00
Adam Stankiewicz
f008e894df Allow for custom property comparators
Fixes issue #1463

Co-authored-by: Alastair Houghton <alastair@alastairs-place.net>
2020-05-12 16:27:46 +02:00
Omer Kahani
231fbeafcb change the order 2020-05-12 11:52:19 +03:00
Ilya Nemakov
b59298e780 External DNS should use ALIAS for AWS Global Accelerator 2020-05-12 11:34:53 +03:00
Raffaele Di Fazio
db4224c705 restructures the providers (build only)
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
2020-05-08 13:05:17 +02:00