Commit Graph

70 Commits

Author SHA1 Message Date
lovemai073
bc2ccea9ea Add AWS region ap-east-1(HK)
User using ELB in HK region will add new CNAME and TXT records to Route53.
Add AWS HK available region ap-east-1.
https://docs.aws.amazon.com/general/latest/gr/elb.html
note:clear repository
2020-04-08 20:43:03 +08:00
Markus Cisler
14d64e09f2 Change DomainFilter to apply to records as well
This moves `domain_filter.go` to the `endpoint` package to make it
possible to filter and exclude record names in
`plan.filterRecordsForPlan()` so it does not have to be implemented in
every single provider.

Because some providers access `DomainFilter.filters` directly it had to
be exported.
2020-02-24 11:19:45 +01:00
Tariq Ibrahim
394f46cd64
uprade golangci-lint and add megacheck & interface linters 2020-01-23 14:49:23 -08:00
tariqibrahim
672b00d821 add ctx parameter to provider interface and aws API 2020-01-12 13:16:55 -08:00
Tariq Ibrahim
bf4b1767fa
add more linters and improve code quality 2020-01-07 15:18:00 -08:00
Tariq Ibrahim
41ba7f1ff5
rename project root package to sigs.k8s.io 2020-01-06 08:08:35 -08:00
Nick Jüttner
9418e3acd8
Merge pull request #1008 from devkid/feature/aws-routing-policies
[RFC] Add support for all AWS Route53 routing policies; add additional Setldentifier abstraction layer
2019-11-19 11:21:12 +01:00
Nick Jüttner
f763d2a413 Move into kubernetes-sigs organization (#1245)
* Move into kubernetes-sigs organization

* Disable labeler action for forks
2019-11-01 17:10:19 +01:00
Alfred Krohmer
6681a3a358 Add support for all AWS Route53 routing policies; add additional SetIdentifier abstraction layer
This adds support for all AWS Route53 routing policies, namely:
* simple (default)
* weighted
* latency
* failover
* geolocation
* multi value answer

These routing policies allow to create multiple records with the same
name, but different "SetIdentifiers". Therefor, as a prerequisite for
implementing support for above routing policies, there is a new
"abstraction layer" added that handles this SetIdentifier by adding a
new attribute in the Endpoint struct and adding another level in the
plan table.
2019-09-10 20:47:36 +02:00
Martin Linkhorst
4dce600a2b feat(aws): allow to force usage of CNAME over ALIAS 2019-07-17 14:46:32 +02:00
twilfong
fb861513e1 remove comment to make travis linter happy 2019-06-28 16:53:05 -07:00
twilfong
b337256bda fix validateRecords() to allow for different ordering in actual vs expected 2019-06-28 16:30:59 -07:00
twilfong
305482528e add test for creating records with dualstack AWS load balancer 2019-06-28 14:07:39 -07:00
Michael Fraenkel
fab942f486 Cache the endpoints on the controller loop
The controller will retrieve all the endpoints at the beginning of its
loop. When changes need to be applied, the provider may need to query
the endpoints again. Allow the provider to skip the queries if its data was
cached.
2019-05-07 19:51:53 -04:00
Kubernetes Prow Robot
0e7e7b116d
Merge pull request #975 from fraenkel/alias_ttl
Set a default TTL for AWS Alias records
2019-04-16 04:25:09 -07:00
Kubernetes Prow Robot
cce6269d8c
Merge pull request #960 from njuettner/gomod
Switch to go modules
2019-04-14 13:16:00 -07:00
Michael Fraenkel
f4f9708791 Set a default TTL for AWS Alias records 2019-04-13 16:21:12 -04:00
Kubernetes Prow Robot
38089fcd8c
Merge pull request #966 from fraenkel/streamline
Streamline AWS ApplyChanges
2019-04-11 08:44:13 -07:00
Michael Fraenkel
f4f3c9939f Streamline AWS ApplyChanges
- collect the zones and records once
2019-04-11 07:32:20 -04:00
njuettner
76c09dab1f Switch to go modules 2019-04-09 17:22:36 +02:00
Jason Fillo
3881192067 aws-r53: adding china ELB endpoints and hosted zone id's. corrected formatting 2019-04-09 09:58:10 -05:00
Jason Fillo
86bd0108ef aws-r53: adding china ELB endpoints and hosted zone id's. fixed spacing 2019-04-09 09:25:31 -05:00
Jason Fillo
2f34d2d201 aws-r53: adding china ELB endpoints and hosted zone id's 2019-04-09 09:25:21 -05:00
Nick Jüttner
6d39526069
Merge branch 'master' into cloudflare-proxied-annotation 2019-01-24 11:16:54 +01:00
Cesar Wong
65e13af9b7 Add zone tag filter for AWS 2018-12-07 10:38:52 -05:00
Erik Swets
e0e7a9defd Allow setting Cloudflare proxying by annotation 2018-11-16 12:52:47 +01:00
Nick Jüttner
ae2b782b58
Merge pull request #742 from mytaxi/feature/add-alias-annotation
Feature/add alias annotation
2018-11-14 14:22:58 +01:00
k8s-ci-robot
3bc7e07cd3
Merge pull request #727 from etopeter/aws_wildcard_txtprefix_match
Matching entire string for wildcard in txt records with prefixes
2018-11-14 04:55:27 -08:00
vaegt
a4b753df6c
Format changes 2018-10-16 14:29:41 +02:00
vaegt
bb80f99e17
Add alias annotation for ingress 2018-10-16 13:30:07 +02:00
Peter Strzyzewski
8084a5e41b Fixed tests store records with escaped wildcard. Added test to verify wildcard record with prefix. 2018-10-04 11:28:16 -07:00
Martin Linkhorst
f21f45b15d
fix(aws): correctly populate target health check on existing records 2018-10-02 17:44:02 +02:00
Peter Bale
25b7cfb25c Moving methods around
This is an update to the order in which we have the new mock methods.

Removed comment and added comment to exported mock helper.
2018-09-07 13:32:40 +01:00
Peter Bale
93053087f1 Adding new tests for additional batching logic
This is to add two new tests which will cover the new logic where the
submit route53 changes function can error if any one of the updates
fails for any given batch in any given zone. Additionally, there is now
a test to check that the application does not try and create a set of
entries if the total number of changes associated with a given name is
greater than the total number of allowed changes per batch.
2018-09-06 16:44:20 +01:00
Peter Bale
be4b4accf9 Change the way aws batching works
This is to change the way batching works when using the aws provider.
Originally, batching would take the first n records you want to update
and perform the desired actions on those records as part of a sync. It
would then wait for the configured sync period and take the first n
records again and sync them. The issue with this is that when you are
using the TXT registry with a custom prefix, the updates can sync a TXT
record and not the accompanying A/CNAME record. This causes external-dns
to get out of sync with what is created and what the current state
actually is. This update uses the same idea of batching, however, rather
than stopping after the first batch until the next run, batching will
now have a separate batch interval which controls the interval between
each batch in the same sync period. This allows external-dns to fully
sync with route53 as part of each sync and can then know that the state
is complete.

Fixes https://github.com/kubernetes-incubator/external-dns/issues/679
2018-09-06 16:44:20 +01:00
Peter Bale
ee941aab56 Add aws-evaluate-target-health flag
This is to add a new `--aws-evaluate-target-health` which allows the
user to override the default EvaluateTargetHealth value (currently set
to `true`) when creating AWS Route53 ALIAS records. To disable, pass
`--no-aws-evaluate-target-health` as outlined in the help page.

Closes https://github.com/kubernetes-incubator/external-dns/issues/627
2018-07-06 11:58:55 +01:00
Eric Lordahl
5cef5a4629 Reorder provider/aws suitable-zones tests (#608) 2018-06-20 17:46:34 +02:00
Nick Jüttner
2e4778fac8
Merge pull request #594 from elordahl/names
AWS provider: Properly check suitable domains
2018-06-20 17:15:46 +02:00
Peter Bale
e34bf552d6 Add aws max change count flag (#596)
* Create `NewAWSProvider` with `AWSConfig` struct

Rather than calling `NewAWSProvider` with a list of objects, you will
now call it using a new `AWSConfig` struct. This allows for clearer
declarations of variables which becomes even  more important as more
variables are added.

* Add `aws-max-change-count` flag

Adding a new `aws-max-change-count` flag to override the default max
change count on the aws provider.

Included updated tests with a new `defaultMaxChangeCount` constant and
tests for setting the value as a flag and as an environment variable.

* Update CHANGELOG.md

Updating CHANGELOG.md with 'Add aws max change count flag' PR.
2018-06-18 14:21:37 +02:00
Eric Lordahl
d250699af3
AWS provider: Properly check suitable domains 2018-06-14 14:18:10 -04:00
Martin Linkhorst
3f675b0cb1 feat: add support for AWS NLBs 2018-04-19 10:10:38 +02:00
Gary Kramlich
5c54d71cba Clean up some calls that were missed on the parameter re-ordering 2018-03-21 12:01:56 -05:00
Gary Kramlich
1cef71e0be Inititial support for multiple targets per record 2018-03-13 23:16:51 -05:00
Till Klocke
5d54849699 Implementation of multiple targets based on PR #404 and #396 (#418)
* Endpoint.Target is now Endpoint.Targets. This is its own type representing mutliple targets for a single DNS name while adding some convenience for sorting and comparing

* Made everything compile and tests run through with the new Endpoint.Targets

* The ingress source can now properly handle multiple target ips per host

* Added custom conflict resolver, to better understand how conflict resolution has to work for me

* My custom conflict resolver behaves a bit different than the PerResource resolver, therefore I needed to modify the expected test result

Removed unnecessary FIXME

* The ingress source now creates CNAME endpoints with multiple targets to let the DNS provider decide how to handle multiple CNAME targets. This could be interesting for weighted targets etc.

* Adopted the expected results to the new way we create endpoints for CNAMEs

* Removed Add method from Targets since manipulating the slice through here is unnecessary complicated and doesn't deliver enough convenience

* Reverted ConflictResolver to the original one. There is some discussing to do what the best way is to handle conflicts

* Added missing documenting comment to IsLess of Targets

* Added documenting comments to Targets,Targets.Same and NewTargets to clarify their intention and usage

* Service source now also generates endpoints with multiple targets

* Service and Ingress source now sort all Targets for every Endpoint to make order of Targets predictable

* Endpoints generated by the Google Cloud DNS provider now also have sorted Targets to make order of Targets predictable

* Modified provider dyn to be able to compile with multi target changes

* Fixed small nitpicks, so my code is acceptable

* Fixed merge method after updating to new Targets. Replacing '!=' with .Same of course needs a boolean negation

* Tests for dyn provider now also use the new Targets instead of Target

* Simplified extractServiceIps as implied by linki to make it more readable

* ref: change service ClusterIP retrieval again

* Added entry to CHANGELOG.md describing the new features contained in this PR
2018-02-21 18:11:45 +01:00
Zach Arnold
bf93fd8844 add paris region (#452)
* add paris region

* adds test
2018-01-30 10:40:49 +01:00
Corey O'Brien
53011dc115 Update AWS private hosted zones in addition to public zone (#356)
* Update AWS private hosted zones in addition to public zone

* Sort slices for consistent ordering in TestAWSSuitableZones

* ref: use len to check for empty list of matched zones

* feat: mention contributors in changelog

* fix: move changelog entry to the unreleased section

* fix: add one more missing attribution to the changelog
2018-01-05 17:32:54 +01:00
Valentyn Boginskey
4dacf81238 New filter: --zone-id-filter (#422)
* Add aws-zone-id flag

* Add Zone ID filter

* Update AWS provider and main

* Make ZoneIDFilter generic

* Implement ZoneIDFilter for all providers

* Update CHANGELOG
2017-12-20 17:00:13 +01:00
Steven Logue
1202cb2185 added AWS API limit function and unit tests 2017-11-09 10:01:21 -08:00
Kevin J. Qiu
71723bdd5b Allow specifying a custom TTL through annotation on Ingress or Service (#320)
* Add RecordTTL

* Route53: test for custom TTL

* Fix tests

* Fix remaining tests

* Add ttl when endpoint is created from ingress

* Missed a word

* Fix bad refactoring

* Add ingress custom TTL test

* gofmt

* Satisfy go-lint

* Unshadow `endpoint` in azure provider

* Fix and add an output test

* Add TTL for endpoints generated from service templates

* Take TTL into account when generating update plan

* Tests for TTL change impact on the plan

* Refactor factory method name

* Refactoring

* Run gofmt

* Make endpoint string format look like BIND config

* Update plan and plan_test

* Replace NewEndpointWithTTLValue with NewEndpointWithTTL in aws

* Remove NewEndpointWithTTLValue func

* Update references to TTL

* Remove getTTLValue func

* Handle merge conflict

* Update tests

* Update README, CHANGELOG and documentation

* Run gofmt

* Move getTTLFromAnnotations to a common file

* Refactor getTTLFromAnnotations

* Gofmt

* Add tests for getTTLFromAnnotations

* Trigger build

* Add boilerplate header

* Update README/CHANGELOG according to code review

* Add ttl.md and link it from README

* change CNAME string to endpoint.RecordTypeCNAME

* fix test cases with AWS ALIAS records, these do not behave different in these tests
2017-10-11 14:17:02 +02:00
Nick Jüttner
f5639c4cb7 #228 Simplify DNS provider requirements by extracting common (#263)
* #228 Simplify DNS provider requirements by extracting common

* #228 Simplify DNS provider requirements by extracting common

* Missing boilerplate added

* rename recordtypefilter, fail fast statements

* rework zone finder, update deps

* chore: drop namespace from cloudflare method name
2017-10-11 12:16:28 +02:00