Commit Graph

351 Commits

Author SHA1 Message Date
Alfred Krohmer
6cab35b404 Add CLI option to always publish not ready addresses of headless services 2020-02-18 19:43:41 +01:00
Oguz Kilcan
21275c9aa0
Updated minTTL variable type from int64 to Duration 2020-02-12 12:18:18 +01:00
Oguz Kilcan
b6111b9768
Refactoring after review
* Updated TTL variable type to int64
* Updated rfc2136 contructor to have nil as last variable
* Removed unnecessary variable `data`
2020-02-11 10:41:09 +01:00
Oguz Kilcan
86c9332b17
Add option to define minimum TTL for rfc2136 provider 2020-02-06 18:23:28 +01:00
jlamillan
fed2f0f0dd
Add --events flag to use informers to automatically trigger sync loop on adds/updates/deletes for supported ingress and service sources. 2020-01-27 11:00:26 -08:00
k.siemer
3d821d74ce Added new provider: Akamai FastDNS 2020-01-21 15:47:02 +01:00
Tariq Ibrahim
a5896c2326
remove context.TODO()s in external-dns 2020-01-15 13:59:20 -08:00
Jaromir Vanek
3f488acd6c AWS-SD: Rebrand AWS Auto Naming to Cloud Map 2020-01-07 17:25:35 -08:00
Tariq Ibrahim
41ba7f1ff5
rename project root package to sigs.k8s.io 2020-01-06 08:08:35 -08:00
Tongyao Si
0c4878f115 feat(Azure): support specifying user assigned identity's clientID to authenticate 2019-11-28 19:08:45 +08:00
saidst
eb0cdb0962 Created Azure Private DNS Provider by forking Azure Provider. 2019-11-19 12:04:46 +01:00
Kubernetes Prow Robot
e9c834ae9b
Merge pull request #1248 from vdesjardins/clouddns-batching
Google Provider: add support for batching updates
2019-11-19 02:23:42 -08:00
Vincent Desjardins
ce94d2f328
Google Provider: add support for batch interval.
The parameter is google-batch-change-interval.
Default value is 2s.
2019-11-01 21:27:21 -04: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
Vincent Desjardins
ce2eadcd66
Google Provider: add support for batching updates
The parameter is google-batch-change-size.
Default value is 1000.
2019-10-31 13:41:02 -04:00
Corey O'Brien
3a62d4eaea Fix --aws-api-retries 2019-08-22 08:35:00 -04:00
Kubernetes Prow Robot
32043f29ac
Merge pull request #1102 from xunpan/config-prefix
add option for coredns to specify prefix name
2019-07-31 02:40:24 -07:00
Kubernetes Prow Robot
eb54263256
Merge pull request #1084 from jonasrmichel/feature/contour-ingressroute
Add source implementation for Heptio Contour IngressRoute
2019-07-30 08:54:51 -07:00
Kubernetes Prow Robot
4421b019d5
Merge pull request #1103 from linki/prefer-cname
Allow to force usage of CNAME over ALIAS
2019-07-26 04:19:59 -07:00
xunpan
b73f67793a
Merge branch 'master' into config-prefix 2019-07-22 22:36:25 +08:00
Jason-ZW
f685704fcc Add rancher dns(RDNS) provider 2019-07-19 19:40:00 +08:00
Martin Linkhorst
4dce600a2b feat(aws): allow to force usage of CNAME over ALIAS 2019-07-17 14:46:32 +02:00
xunpan
984e7de398 add option for coredns to specify prefix name 2019-07-17 02:47:23 -04:00
Jonas Michel
aa551ac704 Add Contour IngressRoute source implementation 2019-07-04 20:06:24 -05:00
Dave Grizzanti
656ec36532 add domain filter for vinyl 2019-07-01 15:34:26 -04:00
Dave Grizzanti
5b28d7f7f3 Add VinylDNS as a provider 2019-06-27 11:07:21 -04:00
Curtis Mattoon
111ad4f72f Add tests for DomainFilter.IsConfigured 2019-05-22 12:19:26 -04:00
Kubernetes Prow Robot
6b07f97eb2
Merge pull request #953 from dsbrng25b/infoblox-max-results
Add --infoblox-max-results setting
2019-05-19 03:35:11 -07:00
Dave Grizzanti
ef88346b9b Rebase for go modules 2019-05-10 11:38:54 -04:00
Dave Grizzanti
81a3fde458 Removing changes to main 2019-05-10 11:34:57 -04:00
Dave Grizzanti
b529a92d5b Add Cloud Foundry routes as a source 2019-05-10 11:34:57 -04:00
Reinier Schoof
3323229ae0 Merge branch 'master' of github.com:kubernetes-incubator/external-dns into transipSupport 2019-05-07 13:23:47 +02:00
Reinier Schoof
a2b07c1383 added TransIP provider 2019-04-28 14:42:07 +02:00
mburtless
4fdeef3f2f Add flags for configuring custom NS1 endpoint and ignoring SSL verification for PrivateDNS support 2019-04-26 10:47:17 -04:00
mburtless
3d46e95f65 Add boilerplate to ns1 provider and tests and simplfy code for inititializing provider 2019-04-22 11:43:38 -04:00
mburtless
bff09c20c9 Initial Skeleton From NS1 Provider
This needs unit tests and a full integration test.

Pushing this as an initial checkpoint.
2019-04-22 11:43:38 -04:00
David Schneider
1a721ac5ce Add --infoblox-max-results setting
The number of objects returned by the infoblox api is limited to 1000 objects
(see https://ipam.illinois.edu/wapidoc). If there are more then 1000 objects
the API returns an error. By setting max-results one can raise the limit.
2019-03-31 18:36:02 +02:00
Christian Glombek
0076e4156c Add support for multiple Istio Ingress Gateways
The --istio-ingress-gateway flag may now be specified multiple times.
2019-03-18 22:13:44 +01:00
Kubernetes Prow Robot
c3702c9130
Merge pull request #895 from dsbrng25b/infoblox-dns-view
Infoblox provider support for DNS view
2019-03-18 09:44:22 -07:00
David Schneider
909e376387 Make view configurable for infoblox provider 2019-03-15 18:05:50 +01:00
Dimitrij Klesev
6da894253e
Run gofmt on main 2019-02-19 11:21:23 +01:00
Dimitrij Klesev
79bf8c807e
Add RcodeZero Anycast DNS provider 2019-02-19 11:20:15 +01:00
Anand Patel
60a79b698b merge with master 2019-02-14 15:17:03 -05:00
njuettner
8810311ca8 Resolving conflicts 2019-01-28 14:15:09 +01:00
Anand Patel
a023ad7475 merge with master 2019-01-18 10:54:24 -05:00
Joe Hohertz
7a28e3047a Adds a new flag --aws-api-retries which allows overriding the
number of retries that API calls will attempt before giving up.

This somewhat mitigates the issues discussed in #484 by allowing
the current sync attempt to complete vs. failing and starting anew.

Defaults to 3, which is what the aws-sdk-go defaults to where not
specified.

Signed-off-by: Joe Hohertz <joe@viafoura.com>
2019-01-17 12:37:27 -05:00
njuettner
370bae6dd3 Cloudflare pagination for zones 2019-01-16 16:13:49 +01:00
Cesar Wong
65e13af9b7 Add zone tag filter for AWS 2018-12-07 10:38:52 -05:00
Anand Patel
3454363d67 allow hostname annotations to be ignored 2018-10-17 17:17:15 -04:00
k8s-ci-robot
dd352b347b
Merge pull request #702 from mackIOConsulting/rfc2136_provider
Rfc2136 provider
2018-10-11 05:49:34 -07:00
Martin Linkhorst
7dbd6b0fa9
fix: pass all relevant CLI flags to AWS provider (#719) 2018-09-27 13:54:40 +02:00
Vladislav Troinich
d32a03ad32 Add couple of tests for RFC2136 provider 2018-09-24 10:52:28 +03:00
Vladislav Troinich
02437bb25c Merge remote-tracking branch 'origin/master' into rfc2136_provider
# Conflicts:
#	Gopkg.lock
#	Gopkg.toml
2018-09-07 10:51:35 +03: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
Jonas Michel
b9b6842195 Add Source implementation for Istio Gateway (#694)
* add Istio Gateway Source

* add documentation for Istio Gateway Source

* make both istio namespace and ingress gateway service configurable

* prefix gateway types, constructors, and flags with 'istio-'

* fix: add missing sources to source flag docs
2018-09-06 16:39:32 +02:00
Vladislav Troinich
0151de539c Add RFC2136 provider 2018-09-06 11:46:01 +03:00
Nick Jüttner
488f10394a
Merge branch 'master' into generic-source 2018-09-03 10:55:12 +02:00
Nick Jüttner
08c791ff5b
Merge pull request #653 from Devatoria/feature/service_types_filter
Add filter by service type feature
2018-08-31 16:37:10 +02:00
Li Yi
1db16f35af Initial support for Alibaba Cloud 2018-08-28 17:30:36 +08:00
shashidharatd
18aee82d3d Add crd source which gets Endpoints from CRD 2018-08-22 19:37:21 +05:30
Devatoria
05068e3ad3 Add filter by service type feature 2018-08-17 17:14:44 +02:00
Nick Jüttner
dbfc884ba3
Merge pull request #678 from cliedeman/fix/linode-user-agent
Set Linode user agent
2018-08-16 17:21:59 +02:00
Julian Vassev
e6cae22ec4 Configure req timeout calling k8s APIs
When running in a pod sometimes the request to get ingreses/services
stalls indefinitely. A simple pod restart fixes this. Hard to reproduce
but I got lucky and did thread dump which revealed a gorouting blocked
on call to k8s.

What's new is a `--request-timeout` flag that makes requests to k8s
bounded in time. The default is 30s - this may cause some deployments
with a slow api-server to timeout.
2018-08-16 02:59:21 -07:00
cliedeman
ba6c82e043 Set Linode user agent and change to linode/linodego package 2018-08-16 11:17:54 +02:00
Loren Brindze
65b33ad7e2 adding assume role to aws_sd provider 2018-08-14 09:44:12 -07:00
cliedeman
65f8b914b1 Linode Provider Implementation 2018-08-14 16:26:14 +02:00
Arttii
874502ebf8 adding a flag to optionally publish hostIP instead of podIP for headless services (#597)
* Added HostPort feature docs

* Fixed some typos

* Fixing hostIP,podIP change

Fixing hostIP,podIP change

Merge artifacts in docs

Naming typo

removing unnecessary files

fix(source): fix misleading log message

Naming typo

removing unnecessary files

* fix(source): fix misleading log message
2018-07-26 18:16:32 +02:00
Nick Jüttner
717ee8440c
Merge branch 'master' into external-dns-exoscale 2018-07-12 12:21:12 +02:00
Nick Jüttner
f38c347636
Merge branch 'master' into external-dns-exoscale 2018-07-12 11:30:05 +02:00
Andrew Pryde
3c9a944fec Code review comments 2018-07-11 15:44:40 +01:00
Andrew Pryde
88da61e742 Implement Oracle Cloud Infrastructure DNS provider 2018-07-11 15:42:00 +01:00
Christopher Schmidt
07e7103afe implemented dryRun 2018-07-06 07:17:07 +02:00
Yoan Blanc
a487d3878f exoscale: rename exo into exoscale
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
2018-07-04 15:00:21 +02:00
Christopher Schmidt
8003a3f00b initial Exoscale Provider 2018-07-04 14:59:48 +02:00
Jason Hoch
d56ef6dbda gofmt 2018-06-19 15:56:55 -04:00
Jason Hoch
15b279a4bc Adds TLS flags for pdns provider 2018-06-19 15:40:32 -04: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
Nick Jüttner
f458b37662
Merge pull request #589 from jessfraz/cache-results-azure
add cache to limit calls to providers
2018-06-12 12:08:42 +02:00
Jess Frazelle
4759789ac8
add cache to limit calls to Records()
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-06-12 05:34:23 -04:00
Martin Linkhorst
ce0162b01e
Merge remote-tracking branch 'upstream/master' into coredns 2018-05-31 15:53:34 +02:00
Nick Jüttner
baa1da6fa0
Merge pull request #483 from vanekjar/AWS-SD-final
Add AWS Service Discovery provider
2018-05-30 10:31:34 +02:00
Jaromir Vanek
98dfbbe33f Rename aws-sd-registry to aws-sd 2018-05-28 16:53:22 +02:00
Jaromir Vanek
cd94888800 Implementation of AWS ServiceDiscovery provider 2018-05-25 07:45:47 -07:00
Martin Linkhorst
e938d71bc3
Merge remote-tracking branch 'upstream/master' into coredns 2018-05-24 14:20:18 +02:00
shashidharatd
c18c1c79ec Add a new source called connector (#552)
* Add new connector source

* Update docs for connector source
2018-05-22 17:49:16 +02:00
Nick Jüttner
8819ed62e8
Merge pull request #524 from linki/assume-role
AWS: Allow to assume another role
2018-04-18 16:02:06 +02:00
Anhad Jai Singh
ec822d7bbd Add PowerDNS as a provider
Commit adds:
* Implementation of PowerDNS as a provider
* Tests for said implementation
* github.com/ffledgling/pdns-go, which provides go client bindings for
  PowerDNS's HTTP API, as a dependency
* "pdns" as an additional option for the `--provider` flag
* `--pdns-server` and `--pdns-api-key` as additional flags for PowerDNS
  specific configuration
2018-04-16 19:11:35 +05:30
Martin Linkhorst
587b4128cb
feat: allow to assume another role for AWS 2018-04-12 14:59:28 +02:00
Nick Jüttner
5fc7d31a57 Resolving merge conflicts 2018-04-05 12:40:27 +02:00
Helgi Þormar Þorbjörnsson
2319a44fc1 Add a flag that allows FQDN and Annotations to combine (#513)
* Add a flag that allows FQDN and Annotations to combine

Old behaviour is kept by default, a new flag is introduced to combine instead of overwrite

Fixes #218

* docs: add fqdn template combine to changelog
2018-04-04 18:31:22 +02:00
jvassev
3293af66fe Graceful handling of misconfigure password for dyn (#470)
* Graceful handling of misconfigure password for dyn

If a bad password is given for provider "dyn" then the next
login attempt is at least 30minutes apart. This prevents an
account from being suspended.

Improve validation of flags for dyn provider. Add test for
ValidateConfig() and Config.String()

Also add --dyn-min-ttl option which sets the lower limit
of a record's TTL. Ignored if 0 (the default).

* docs: add graceful handling of misconfiguration to changelog
2018-02-21 13:09:17 +01:00
jvassev
02f833975d Don't log passwords on start (#463)
* Don't log passwords on start

The two passwords configurable as flags (for infoblox and dyn) are
masked now and not logged.

* docs: add masking sensitive data in logs to changelog
2018-02-19 13:03:22 +01:00
Martin Linkhorst
a673719d59
Merge remote-tracking branch 'upstream/master' into coredns 2018-02-12 16:55:38 +01:00
Julian Vassev
414d394354 Add Dyn Provider
* add "dyn" provider
* add several --dyn-* args to configure Dyn login
* add github.com/nesv/go-dynect/dynect@0.6.0 to Gopkg and vender/ (the client
  of choice by Terraform)
* make externdns.Version public so it can be stored when committing
  zone changes
* add tutorial for Ingress resources and update root README.md file

Dyn REST API is documented here: https://help.dyn.com/dns-api-knowledge-base/

Example usage:

  external-dns \
    --provider=dyn \
    --dyn-customer-name=acme \
    --dyn-username=acme-api \
    --dyn-password=t0pS3cr3t \
    --domain-filter=portal.acme.com \
    --zone-id-filter=acme.com \
    --namespace=my-test-ns \
    --log-level=debug \
    --txt-prefix=_
2018-02-08 09:37:33 -08:00
Martin Linkhorst
3ef1f9faf0
fix: remove stale wait time on shutdown (#434) 2018-01-05 16:47:44 +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
Stan Lagun
0b870d1850 Support for https for etcd connection
This commit adds ability to use TLS transport for etcd.
New logic is applied when the etcd URL has https:// scheme.
TLS parameters are passed in the environment variables:

ETCD_CA_FILE - path to CA certificate. If not specified, then
system-provided certificates are used.

ETCD_CERT_FILE - client certificate
ETCD_KEY_FILE - client key file
- either both of none of this two must be specified

ETCD_TLS_SERVER_NAME - expected CN of the certificate. Useful when
URL points to a different domain from that in server certificate

ETCD_TLS_INSECURE - if set to "1" (or "true" or "yes") makes client
bypass server certificate validation.

Also for unification with other providers and rest of connection
settings, etcd URL is no longer specified in the command line, but
rather in ETCD_URLS environment variable (defaults to
http://localhost:2379). More than one comma-separated URL can be
specified. All of the URLs must start with either http:// or https://

Also, now it possible to communicate with etcd through proxy specified
in standard environment variables
2017-11-10 14:20:14 -08:00
Khris Richardson
b23765ed27 allow filtering by source annotation (#354)
* allow filtering by ingress class

* generic source annotation filter as opposed to ingress class filter

* rename and fix argument ordering, switch to label selector semantics

* remove redundant parameters
2017-11-09 10:14:40 +01:00
Stan Lagun
48f8f9b647 CoreDNS/SkyDNS provider
This commit adds support for CoreDNS through its etcd middleware.
Because the middleware is backward compatible with SkyDNS this
commit adds support for SkyDNS as well. In fact, new provider
is available under two names in CLI (coredns and skydns).

All interactions with middleware happen through etcd cluster,
whose location (URIs) is specified via --etcd CLI parameter
by default http://localhost:2379).

The provider translates CoreDNS/DkyDNS SRV records to
A/CNAME + optional TXT endpoints, when reading from etcd and
combines A/CNAME with TXT endpoints back into single SRV record
when writing it back.

Also adds github.com/coreos/etcd package to glide.yaml and vendor folder
because it is used by the provider
2017-11-06 14:22:13 -08:00
Anhad Jai Singh
6134fe98fb Fixes #366 (#367)
- Add `--inmemory-zone flag`
- Implement `InMemoryZoneInit` function to setup initial zones for
  inmemory provider
- Make "" the default zone for the inmemory provider instead of
  nil/none when no initial zones are specified
- Update config/flag parsing tests to accept new flag
2017-10-25 10:25:43 +02:00
Khris Richardson
cab3e0454e Initial commit of Infoblox provider (#349)
* Initial commit of Infoblox provider

* address @ideahitme's observations

* fail at addressing @szuecs comments

* fix(infoblox): avoid shadowing err variable

* fix flag descriptions

* default ssl verify to true. thanks @szuecs

* chore(infoblox): bump minium required version

This should ideally be a minor bump but let's do that when we have v0.5
2017-10-12 13:41:18 +02:00
jose5918
09c35b6790 Adds Dnsimple as new provider (#224)
* Adds Dnsimple as a provider

* chore(vendor): remove vendor for smaller diff

* fix(config): make dnsimple selectable via flags

* Fix delete and update

* Dnsimple testify mock tests

* remove leaked file

* Move and simplify mock functions

* chore: use lowercase for logrus repository

* chore: update dependencies using glide

* chore: vendor dnsimple-go package

* ref: isolate suitable type in source package

* add support for DNSimple, thx @jose5918 :D
2017-10-11 12:11:14 +02:00
Martin Linkhorst
3331a57a18 Fix issue with uppercase logrus import (#351)
* chore: use lowercase for logrus repository

* chore: update dependencies using glide
2017-10-09 17:14:18 +02:00
Stan Lagun
0cb99281ff OpenStack Designate provider 2017-09-22 20:55:08 -07:00
Matt Tucker
06c7ea8590 add --log-level=<level> flag to override log-level, remove --debug flag (#339) 2017-09-20 08:57:28 +02:00
Martin Linkhorst
dd1cc4d553 feat(provider/aws): allow filtering for private/public zones (#329) 2017-09-19 23:15:31 +02:00
Kévin Dunglas
02c38d5cf7 Add a new --cloudflare-proxied flag to toggle Cloudflare proxy feature (#340)
* Add a new --cloudflare-proxied flag to toggle Cloudflare proxy feature

* Change flag description
2017-09-18 10:54:08 +02:00
Justin Nauman
9b32e16204 ClusterIp Service support (#278)
* ClusterIP service support

- First pass at addresssing #187 by allowing services with type ClusterIP to be directly supported

* Getting existing tests to pass

* Adjusting formatting for gofmt/govet

* Adding in guard logic around publishing of ClusterIP sources

* Addressing PR feedback

* Adding in CHANGELOG entry

* Adding in Headless service test
2017-08-17 22:39:06 +02:00
Martin Linkhorst
81974cd8a0 refactor source registration (#217)
* ref(sources): refactor source registration and lookup to be lazy.

* fix(fake): don't make changes to passed in config values

* rework without init, tests are missing

* make client provider public

* fix all tests

* change parameter list order, minor improvements

* clientprovider -> clientgenerator, switch naming for interface/struct
2017-06-30 16:54:58 +02:00
Nils Juenemann
73d397961e Support for multiple domains within --domain-filter (#252)
* Support for multiple domains within --domain-filter

The parameter accepts a comma separated list of domains with or without trailing dot. Example: --domain-filter="example.org, company.test.,staging.com". Closes #247 and #229

* Add boilerplate header

* Add documentation for methods and structs

* use StringsVar for the domain-filter flag

* go fmt

* Remove camel case from tests

* Revert changes in README.md

* Move DomainFilter to provider package

* Make a new slice and copy elements to it

* Update CHANGELOG.md

* docs: change minor spelling mistake
2017-06-29 18:59:05 +02:00
Nick Jüttner
cb5863344b CloudFlare as a new provider (#140)
* CloudFlare Provider

* updating glide

* gofmt cloudflare_test.go

* Unset envs to test NewCloudFlareProvider

* More tests

* fix(cloudflare): fix compiler errors resulting from merge

* Typo

* Undo vendor changes

* decrease api calls, fix some nits

* Cloudflare iteration (#2)

* reduce the number of API calls

* match by type and name for record id

* improve coverage and fix the bug with suitable zone

* tests failed due to wrong formatting

* add cloudflare integration to the main

* vendor cloudflare deps

* fix cloudflare zone detection + tests

* fix conflicting test function names
2017-06-16 11:28:13 +02:00
Nick Jüttner
cafe6c08d0 Digital Ocean as a new provider (#171)
* Initial Digital Ocean as a new provider

* chore: vendor dependencies

* Remove zone parameter from ApplyChanges and Records

* fix(digitalocean): fix correct imports, unshadow a variable

* fix(digitalocean): respect domain-filter if provided

* add changes to digital ocean provider from PR review (#3)

* fix tests and bugs in find suitable zones for digital ocean (#5)

* tests failed due to wrong formatting

* add digitalocean integration to the main and more tests

* fix suitable zone for digital ocean
2017-06-16 10:44:03 +02:00
Martin Linkhorst
90604c9dcb Load all known Kubernetes Auth Plugins (#238)
* fix: Load all known Kubernetes Auth Plugins

* chore: vendor CoreOS' oidc library
2017-06-15 18:22:57 +02:00
Yerken
611483d523 remove inmemory provider complex interface (#235) 2017-06-13 13:36:10 +02:00
Peter Huene
3355528c16 Implement Azure DNS provider (#210) (#214)
* vendor Azure Go SDK (#210)

* vendor the Azure Go SDK and dependencies

* add initial Azure DNS provider implementation (#210)

* add 'azure' value to 'provider' command line option
* add 'azure-config-file' command line option
* add 'azure-resource-group' command line option
* implement initial Azure DNS provider

note: azure provider is not yet fully implemented (does not query for existing
records).

tests and documentation are forthcoming.

* add a tutorial for the Azure provider (#210)

* add tutorial for using ExternalDNS with Azure DNS

* finish implementation of Azure DNS provider (#210)

* implement the Records method for the Azure DNS provider

* refactor Azure API interface for future tests (#210)

* make Azure provider use an interface for future unit tests

* add unit tests for the Azure provider (#210)

* test retrieving Azure DNS records.
* test updating and deleting Azure DNS records.
* test dry run for the Azure provider (i.e. noop).
2017-06-02 15:24:52 +02:00
Ian Smith
f06fb65917 Fake source (#205)
* Expose inmemory provider to cli

So we can test `--source fake` without needing to touch AWS/Google.

* Add FakeSource

`external-dns --provider inmemory --source fake --dry-run --once`

OR

`external-dns --provider aws --source fake --fqdn-template <hostname suffix> --dry-run --once`

NB: `--fqdn-template` because otherwise we'll default to creating, e.g.,
`abcd.example.com`, which `--provider aws` filters out because you
likely don't have a Zone for `example.com.`  Could also be resolved by
removing the need to use a real provider; the inmemory provider,
perhaps, though it's not entirely hooked up.

Closes kubernetes-incubator/external-dns#22

* Style feedback from Travis CI

* Improve optionality of kubernetes client

* ref(sources): refactor source registration and lookup to be lazy.

* Revert "ref: refactor source registration/lookup to be lazily initialized"
2017-05-29 13:59:50 +02:00
Martin Linkhorst
a18656f1b0 add client-side metrics for all external calls (#188)
* chore: add instrumented HTTP client library

* feat: add client-side metrics to outgoing HTTP clients
2017-05-22 15:39:59 +02:00
Martin Linkhorst
c12424192d add and use a deduplicating source (#185)
* feat: add and use a deduplicating source

* chore: add log entry when endpoint was deduplicated
2017-05-05 14:59:36 +02:00
Martin Linkhorst
da3c17a65c allow setting flags via env vars (#124)
* feat(config): change defaults, switch flag processing to kingpin

* chore: vendor kingpin as a dependency

* feat(config): auto-detect cluster config from the environment

* chore: clean up definition of flags

* chore: sanitize flags even further

* chore: update changelog with latest flags changes

* fix(aws): fix messed up test name
2017-04-27 13:57:45 +01:00
Yerken
82a172a9f9 minor improvements to logging (#175)
* minor improvements to logging

* chore(*): change log.Infoln to log.Info

* fix: fix incorrect example code
2017-04-26 12:06:16 +02:00
Martin Linkhorst
e5f21ad32a add multi-zone capability to google provider (take 2) (#163)
* feat(google): auto-detect and multiple zone support

* chore: run gofmt with the simplified command

* fix: pass desired domain to google provider

* feat(google): correctly auto-detect records for sub-zones

* chore: update changelog with support for multiple zones in google

* fix(google): don't append traling dot to TXT records

* ref(provider): extract hostname sanitization to general provider
2017-04-25 17:45:36 +02:00
Yerken
25eef9159c [PR-156 follow-up] Generate endpoints hostnames if go-template is specified (#160)
* add --fqdn-template

* add missing ,

* gofmt

* no endpoint creation on empty fqdntemplate

* improve test coverage

* gofmt simple on service_test.go and ingress_test.go

* import package order changed

* gofmt

* refactor to generate template in the source init

* refactor for err handling

* fix service tests

* fix wrong check, check for priorities, mate > template

* fix tests, check for controller annotation in the right place

* add to changelog

* add flag description, improve testing, reorganize imports

* review changes: log the error, use text/template, change func interface
2017-04-18 18:13:08 +02:00
Henning Jacobs
57947e54e4 log config on startup (#161) 2017-04-18 18:10:37 +02:00
Martin Linkhorst
03d76204f9 support multiple hosted zones and automatic lookup (#152)
* feat(aws): support multiple hosted zones and automatic lookup

* chore: run gofmt with the simplified command

* fix(aws): add missing method from google provider

* fix: remove superflous parameter from google provider

* feat: make domain configurable via flag

* fix(aws): remove unused constant

* fix(aws): don't log actions that were filtered out

* feat(aws): detect best possible zone to put dns entries in

* fix(aws): log error instead of failing if a change batch fails

* chore: update changelog with support for multiple zones
2017-04-13 17:57:18 +02:00
Yerken
0b43cf511f cmd flags fixes, fix the bug with multi source (#149) 2017-04-12 18:13:03 +02:00
Martin Linkhorst
644206c952 allow plans to be parameterized via policies (#127)
* feat(plan): allow plans to be parameterized via policies

* fix(controller): set a policy in the controller tests

* chore: allow go tip to fail

* chore: update changelog to include policies

* fix(plan): store a pointer to changes

* fix(controller): don't get address of a pointer
2017-04-12 12:49:11 +02:00
Yerken
98de0142ba kickoff txt registry (#137)
* kickoff txt registry

* fix inmemory dns provider to include recordtype info for validation

* Merge master

* fix ununsed variable in inmemory provider

* add tests for records

* add test for no prefix name formatter

* implement apply changes with tests

* add flag to enable txt registry

* add txt registry to main

* improve sort testing

* filter out non-owned records

* NewEndpoint(...) requires record type

* use newendpoint in aws_test, fix tests

* change suitable type implementation

* fix the test for compatibility component

* change inmemory provider to include recordtype and use suitable type

* fix comments, CNAME should target hostname

* name mapper do not use pointer on struct

* txt prefix - just concatenate, remove spew, fix txt record label

* allow TXT records as result from dns provider

* add changelog

* fix tests

* TXT records need to be enclosed in double quotes
2017-04-11 23:10:38 +02:00
Martin Linkhorst
9d48d89240 feat(source): support services annotated with mate's annotations (#141) 2017-04-10 15:43:41 +02:00
Yerken
9a44453d59 define registry interface (#120)
* define registry interface

* init in-memory registry

* remove ununsed variable, added comments

* add inmemory registry tests

* introduce DNSRecord struct

* use noop registry

* remove zone from registry fields

* replace provider with registry in controller

* move noop registry interface check to test

* remove ownerid from noop registry

* fix: remove dangling empty line

* return provider records directly with noop

* adjust according to pr review

* fix noop tests
2017-04-07 16:00:24 +02:00
Martin Linkhorst
ecdd5bc066 metrics: expose basic golang metrics via prometheus (#132)
* feat: expose basic go metrics via prometheus

* chore: vendor dependencies

* feat(metrics): combine healthz and metrics into single endpoint

* ref(metrics): rename metrics port to address

* docs(metrics): update changelog to include metrics feature

* ref(metrics): consistently rename port to address
2017-04-07 14:11:41 +02:00
Martin Linkhorst
facdea51dd feat: make interval between synchronizations configurable (#123) 2017-04-04 16:14:56 +02:00
Martin Linkhorst
318c6e532c ref(*): rename DNSProvider to just Provider (#101) 2017-03-17 14:35:10 +01:00
Martin Linkhorst
8170947af0 remove provider store and don't initialize each DNS provider (#96)
* fix(dnsprovider): do not always initialize each DNS provider

* fix(dnsprovider): fix unnecessary error return value

* ref(dnsprovider): drop the store and use a simple switch for lookup
2017-03-16 17:10:33 +01:00
Martin Linkhorst
476c3efddf feat: allow to specify providers via the cli (#89) 2017-03-14 14:13:13 +01:00
Martin Linkhorst
e6749c8d3d feat: allow to register and lookup sources by name (#84) 2017-03-14 10:55:12 +01:00
Martin Linkhorst
c3378f7f67 use constructor methods to create sources (#82)
* ref(source): use constructor methods to create sources

* fix: import and use missing package

* fix(source): fix merge conflict with master branch
2017-03-13 14:18:20 +01:00
Mikkel Oscar Lyderik Larsen
6b2b691807 Add tests for Google DNS provider 2017-03-12 20:13:03 +01:00
Martin Linkhorst
7f5b54d1e0 feat: add --version flag (#75) 2017-03-09 18:14:26 +01:00
Martin Linkhorst
7058f6c428 Merge pull request #60 from linki/once
add once flag to exit loop after first sync
2017-03-07 20:04:48 +01:00
Martin Linkhorst
d1a510a402
fix: call RunOnce directly and exit when --once is provided 2017-03-07 16:36:14 +01:00
Martin Linkhorst
78a2b1d8d5
feat: allow passing a namespace that limits found resources 2017-03-06 16:41:14 +01:00
Martin Linkhorst
9338080b29
feat: add once flag to exit loop after first sync 2017-03-06 16:14:29 +01:00
ideahitme
a0b66b91f3 refactor 2017-03-02 16:47:38 +01:00
ideahitme
885b2349e1 better flag parse testing 2017-03-02 15:55:49 +01:00
Martin Linkhorst
99371a1e83 implementation of basic control loop (#40)
* feat(google): add ability to apply changes generated from a plan

* feat(controller): first implementation of controller

* feat: allow to configure in-cluster and kubeconfig

* fix(controller): call RunOnce at the right time and in a loop

* feat(google): add dryRun attribute to Google DNS provider

* fix: use hosted zone id instead of DNS name

* fix(google): stupidly filter by A records for now

* feat: allow specifying the google project and zone

* feat: provide a dry-run flag which defaults to false

* chore: vendor new dependencies

* fix(config): fix failing tests for config object

* ref(controller): return plain value of ApplyChanges

* ref: simplify how to get a valid kubernetes client
2017-03-01 16:17:47 +01:00
Justin Santa Barbara
cb364cdbf7 Move config to apimachinery (#37)
Types that we want to work using apimachinery typically go into
pkg/apis/X, and the validation goes into pkg/apis/X/validation.  We then
add versions into e.g. pkg/apis/X/v1alpha1, but this feels premature at
the moment.

Changing this later is annoyingly difficult, especially in terms of
validation and dependencies.

We will want the apimachinery, so that we can configure from a
configuration file that is versioned.  Hopefully dns-controller won't
end up so complicated that we will require it, but I think there is also
value in following the "standard" patterns for controllers that are
emerging from e.g. ingress.

For a fairly simple example of an API, please consult
https://github.com/kubernetes/kubernetes/tree/master/pkg/apis/certificates
2017-03-01 11:49:02 +01:00
ideahitme
0537b77f16 boilerplate header is newline sensitive -_- 2017-02-21 18:53:50 +01:00
ideahitme
c666bbcb7d add boilerplate header 2017-02-21 18:47:07 +01:00
ideahitme
74a2d8ace7 move config to separate package 2017-02-21 16:15:21 +01:00
ideahitme
13b4c8c094 add config validate tests 2017-02-21 14:32:50 +01:00
ideahitme
c6af349a9b add main, config, termination, healthcheck 2017-02-21 14:10:09 +01:00