Commit graph

199 commits

Author SHA1 Message Date
Vatsalya Goel 443401d2a7 Upgrade go version to 1.13 (#550)
Sustained Engineering
2019-10-05 10:45:57 -04:00
Craig Peterson 364aac5073 fix format 2019-06-27 01:21:23 -04:00
Craig Peterson 394b9ccf41
respect max batch size for r53 (#509) 2019-06-26 23:45:34 -04:00
Tom Limoncelli a5dcad06a3
Fix integration tests (NAMEDOTCOM, CLOUDFLARE) (#498)
NAMEDOTCOM: TXTMulti is broken. Disable.
CLOUDFLARE: Fix SSHFP tests.
2019-05-27 15:10:00 -04:00
Koen Vlaswinkel 5538de6682 IGNORE() now supports glob pattern/wildcards (#463) 2019-05-27 10:14:29 -04:00
Peter Dunaskin 7383751803 Fix integration test. 2019-04-17 11:23:32 +02:00
Peter Dunaskin 7566c0428e Attempt to add NAPTR support. 2019-03-28 15:40:13 +01:00
karlism f9fc6243d4 Add SSHFP DNS record support. (#439)
* Add SSHFP DNS record support.
* Fix integration test.
2019-01-28 17:26:20 -05:00
Tom Limoncelli 93a36cbba9
GCLOUD: Support TXTMulti (#415)
* GCLOUD: Support TXTMulti
* Testing: Test max TXT record length
2018-10-14 10:53:11 -04:00
Craig Peterson d006f62f8f make sure key/value grouping always uses fqdn 2018-09-07 13:46:44 -04:00
Antoine Cœur 0d52745164 typo (#338) 2018-03-21 08:12:05 -04:00
Tom Limoncelli a7eba97ada
Refactor in preparation to unexport RecordConfig.{Name,NameFQDN,Target} (#337)
* Preparing for the unexport of Name/NameFQDN/Target
* Cleanups
2018-03-19 17:18:58 -04:00
Craig Peterson 19ca760072 fix for deleting wildcard from r53. includes failing integration test 2018-03-01 10:09:02 -05:00
Tom Limoncelli 54de1ff698
NEW PROVIDER: OctoDNS (#309)
* govendor gopkg.in/yaml.v2
* Ignore YAML and BIND test data litter.  Create README.txt files to force git to create subdirectories.
* Update convertzone to also read OctoDNS files
2018-02-27 17:36:47 -05:00
Tom Limoncelli b83630044f Correction: Fix error message. 2018-02-27 16:53:02 -05:00
Tom Limoncelli 1097c96fcc
New Provider: GANDI-LIVEDNS (API v5) (#320)
* Add gandi LiveDNS api provider
* vendor testify and gandi live DNS
* govendor update github.com/prasmussen/gandi-api/{client,live_dns}
* Fix Gandi-livedns TXT unit test
* TravisCI should use go 1.10
2018-02-24 13:40:18 -05:00
Brice Figureau 7b8d608019 ROUTE53: Support Route53's ALIAS record type (#239) (#301)
* Stable comparison of metadata (#239)

Iterating over a map in Go never produces twice the same ordering.
Thus when comparing two metadata map with more than one key, the
`differ` is always finding differences.

To properly compare records metadata, we need to iterate the maps
in a deterministic way.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>

* Support for Route53 ALIAS record type (#239)

Route53 ALIAS doesn't behave like a regular ALIAS, and is much more
limited as its target can only be some specific AWS resources or
another record in the same zone.

According to #239, this change adds a new directive R53_ALIAS which
implements this specific alias. This record type can only be used
with the Route53 provider.

This directive usage looks like this:
```js
D("example.com", REGISTRAR, DnsProvider("ROUTE53"),
R53_ALIAS("foo1", "A", "bar") // record in same zone
R53_ALIAS("foo2", "A",
  "blahblah.elasticloadbalancing.us-west-1.amazonaws.com",
   R53_ZONE('Z368ELLRRE2KJ0')) // ELB in us-west-1

```

Unfortunately, Route53 requires indicating the hosted zone id
where the target is defined (those are listed in AWS documentation,
see the R53_ALIAS documentation for links).
2018-01-16 05:53:12 -05:00
Brice Figureau 2fc55dfdc4 Add IGNORE(label) which ignores label at the provider (#183) (#300)
* Add support for the IGNORE(name) directive (#183)

IGNORE is like NO_PURGE but for a spefic record instead of the whole
zone. This is very useful for instance if you have a zone where
only some records are managed externally from dnscontrol (for instance
using kubernetes external dns system).

Adding IGNORE("foo") in the zone will make dnscontrol not trying
to manage the "foo" record (and especially not deleting it).
dnscontrol will error out if the "foo" record is both ignored and
managed in dnscontrol.

This can be seen as a generic Cloudflare's ignored label.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>

* Deprecate CloudFlare ignoredLabels in favor of IGNORE (#183)

Since IGNORE implements a generic `ignoredLabels` system, let
the user know CF `ignoredLabels` are deprecated.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2018-01-15 15:39:29 -05:00
Pat Moroney 91e2cf67ef NAMEDOTCOM: add TXTMulti capability (#299)
* add TXTMulti capability to the namedotcom provider
* run go generate
* escape multi txt records before sending to the API
2018-01-11 07:23:59 -05:00
Tom Limoncelli b7c251190f
Vet and Lint the entire system (#296)
* govet and golint corrections
2018-01-09 12:53:16 -05:00
Tom Limoncelli de88bfe8b7
Add support for TXT records with multiple strings (BIND, ROUTE53) (#293)
* BIND: Support TXT records with multiple strings (#289)
* ROUTE53: Add support for TXT records with multiple strings (#292)
2018-01-04 19:19:35 -05:00
Tom Limoncelli 2d51cd57ed
NS1: TXT records are broken if they contain spaces (#270)
* Integration tests: Add simple TXT tests.
* NS1: Fix bug in TXT record handling.
2017-11-20 08:53:44 -05:00
Brice Figureau e44dde52e2 New Provider: OVH DNS Provider (#143) (#175)
* OVH DNS Provider (#143)

This adds the OVH Provider along with its documentation.

Unfortunately we can't set this DNS provider to support `CanUsePTR`,
because OVH only supports setting PTR target on the Arpa zone.

* OVH Registrar provider (#143)

This implements OVH as a registrar provider.
Note that NS modifications are done in a "best effort" mode, as the
provider doesn't wait for the modifications to be fully applied
(the operation that can take a long time).

* Allow support for dual providers scenarios

Since OVH released their APIv6, it is now possible to update
zone apex NS records, opening the door to complete dual providers
scenarii.

This change implements apex NS management in an OVH zone.
2017-11-10 11:02:34 -08:00
Tom Limoncelli e7472f76f3 Downcase DNS names (#253)
* Downcase DNS names
* Document opinions
2017-11-07 14:12:17 -08:00
Tom Limoncelli b409637332 Revert! 2017-10-25 12:11:51 -04:00
Tom Limoncelli 2a98e29eb0 wip! 2017-10-25 11:52:54 -04:00
Craig Peterson 2c5f4c88ea DNSimple: handle pagination appropriately. (#242)
* dnsimple paging

* remove unrelated change
2017-10-18 13:53:44 -04:00
Jamie Lennox 7daa7a6467 Add SoftLayer DNS provider (#59)
Add SoftLayer DNS as a DomainServiceProvider.

The SoftLayer API is a bit of a mess and treats MX and SRV records
differently. This leads to some replication and custom handling issues
to work around.

In this patch I have to change the SRV test case to be _tcp instead of
_protocol because softlayer requires a "known" protocol which AFAICT is
tcp, udp or tls. I think this will be acceptable in most cases.

Signed-off-by: Jamie Lennox <jamielennox@gmail.com>
2017-09-26 13:14:53 -04:00
eliheady 4aac517d62 Add TLSA record support (#165) (#203) 2017-09-15 09:03:29 -04:00
Craig Peterson 6ce221df49 comment gandi page size 2017-09-13 11:56:40 -04:00
Craig Peterson b0c465c3a9 Ns1 provider (#63)
* add ns1 libs to vendor

* Create shim and wire into tests

* ns1 provider more working.

* vendor correct files

* comment diff functions

* ns1 docs

* making mx work with ns1

* ?

* refactor tests to make capability blocks easier. fix up ns1
2017-09-13 11:49:15 -04:00
Tom Limoncelli e15b28c3b6 ROUTE53: Fix broken integration test. 2017-09-08 17:13:59 -04:00
Tom Limoncelli 7116fd9bce Add integration test for large (>100 record) zones 2017-08-31 15:10:46 -04:00
Tom Limoncelli aa5db83563 integration_test.go: SRV tests should use more realistic data. 2017-08-30 18:41:43 -04:00
Juho Teperi ad27cc9b3b Digitalocean provider (#171)
* Implement Digitalocean provider
* Vendor digitalocean lib
* Enable SRV for Digitalocean and fix the tests
* Test cname etc. records pointing to the same domain
2017-08-10 13:31:20 -07:00
PJ Eby 638ee45e6c Implement SRV support for CloudFlare provider (#174)
* Implement SRV support for CloudFlare provider
* go fmt
* Use valid SRV names in SRV tests
2017-08-10 13:02:06 -07:00
Pat Moroney 93764da4e3 Namecom punycode (#170)
* convert records to punycode before processing

* make IDN CNAME target use a real IDN TLD
2017-08-05 08:08:22 -07:00
Tom Limoncelli 2f0f5330fc Add CAA support (#161)
* Added CAA support

* Fixed bind parsing of CAA records

* Added CAA parsing test

* Renamed CAA json fields

* Added CAA tag validation

* Updated CAA docs to clarify on the value field

* parse_tests: Fixed typo in caaflags

* Added integration test

* Small cleanups
2017-07-25 14:59:40 -04:00
Tom Limoncelli e6ce3b8895 Cleanup SRV testing
* Integration tests: PTR tests should only happen if CanUsePTR
* Integration tests: SRE tests should only happen if CanUseSRV
* CanUseSRV should be validated early (in pkg/normalize/validate.go)
* CLOUDFLARE does not support SRV. Check for this during validation
* GCLOUD CanUsesRV (mostly by accident, but whatever works)
2017-07-20 15:55:26 -04:00
Tom Limoncelli d55b20ecdb Add SRV Record Type (#136)
* Add support for SRV records for NAMEDOTCOM and ROUTE53.
* Improve docs
* Rename RR() to ToRR().
* Rename RecordConfig Priority to MxPreference (affects json IR data)
2017-07-19 15:53:40 -04:00
Tom Limoncelli 582e5c2bb1 Make PTR more magical (#148)
* Initial code and tests
2017-07-07 13:59:29 -04:00
Craig Peterson 42ef9f4b9e moving a bunch of packages under pkg (#124)
* moving a bunch of packages under pkg

* fix gen

* fix tst

* oops

* fix test fo real

* parse mx/a
2017-05-25 14:25:39 -04:00
Craig Peterson fb14cea91e Support ALIAS records with Cloudflare (#89)
* simple facility for registering provider capabilities

* support for cloudflare. tests.

* js and docs

* docs

* generate
2017-04-19 13:13:28 -06:00
Craig Peterson bb1dcac520 Testing and fixing AD (#74)
* updates to AD

* fix linux build
2017-04-13 10:19:51 -06:00
Craig Peterson 7073b8f989 getting tests setup for r53. Not mixing deletes and other changes in same changeset. 2017-03-22 13:08:23 -06:00
Craig Peterson 6dea5e30cf tests for mx records 2017-03-22 10:54:55 -06:00
Craig Peterson 1f1e0fbab3 log corrections on second run 2017-03-22 10:41:54 -06:00
Craig Peterson 2ac43a424b Letting you run only some tests. Way to document failures in individual providers and skip. 2017-03-22 10:40:47 -06:00
Craig Peterson 101916a6e4 Integration Testing framework (#46)
* integration test started

* details

* More tests.

* idn tests and punycode (not tested fully because I'm on an aiplane)

* test for dual provider compatibility

* readme for tests

* vendor idna

* fix casing
2017-03-16 22:42:53 -07:00