Commit Graph

27 Commits

Author SHA1 Message Date
Tariq Ibrahim
41ba7f1ff5
rename project root package to sigs.k8s.io 2020-01-06 08:08:35 -08: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
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
Christian Simon
ef77161ab0 Google zones should be filter by their ID and Name
Before we only filter by the zone ID, which is an integer value, that is
not exposed in the GCP Console and by the related terraform resource.
This allows to filter by either ID or Name whatever matches.
2019-05-16 14:06:13 +01: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
njuettner
76c09dab1f Switch to go modules 2019-04-09 17:22:36 +02:00
Kevin Davis
1c57771337 Fix handling of custom TTL values with Google DNS. 2018-09-09 22:11:44 -07:00
xianlubird
98f0013b2a Fix google file format problem 2018-08-30 20:09:08 +08: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
Nick Jüttner
3652e0c90a Only store endpoints with their labels in the cache (#612)
* Set cacheinterval flag to 0 by default and if it is zero don't use cache

* fix: run gofmt -s in go1.11
2018-06-28 13:56:38 +02:00
Martin Linkhorst
ce8f1d851c
Correctly filter records that don't match all filters (#533)
* fix(google): correctly filter records that don't match all filters

* update changelog with the filters fix

* fix(google): add test to ensure domain filter works
2018-04-23 15:50:09 +02:00
Gary Kramlich
1cef71e0be Inititial support for multiple targets per record 2018-03-13 23:16:51 -05:00
leigh schrandt
930c8d4856 Google Provider logging for misconfigured zones (#388)
* provider=google: Improve Logging / Filter Endpoints

1. move dry-run exit after `separateChange()`
2. log records after `separateChange()`
3. make `newRecords()` a method of `GoogleProvider` — use `domainFilter.Match()` foreach `endpoint.DNSName`
   ^ without this, non-relevant endpoints show up in the warnings for “No matching zone”

* provider=google: Add tests for domainFilter

- new test: `TestGoogleRecordsFilter`
- add no matching zone and filtered record to `TestGoogleApplyChanges`
- allow `setupGoogleRecords` to createRecords without validateEndpoints

* provider=google: Improve zone-matching logs

- Add `DomainFilter.isConfigured()`
- Conditionally log zone matching for the user based off of `DomainFilter.isConfigured()`
- Rename `provider.newRecords()` to `provider.newFilteredRecords`

* fix: ensure that our setup methods are correct by keeping the tests
2018-01-08 11:51:25 +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
leigh schrandt
65f4239d44 provider=google: Add Ttl from annotations:
Use `int64(ep.RecordTTL)` in `newRecord()`
Fallback to hardcoded 300s for backwards-compat
Add `TestNewRecords()`
Add notes in *ttl.md*
2017-11-14 15:23:51 -07: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
Seth Pollack
f14a953b5f Kops Compatibility #1: Set RecordType at source (#248)
* set RecordType at source

* add comments for linting
2017-08-25 14:41:40 +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
Yerken
229944f7ab make all provider implementation public, return struct instead of interface (#234) 2017-06-13 10:32:13 +02:00
Martin Linkhorst
406afacbf7 experiment: use testify in test code (#186)
* ref(source): use testify with mocks in test code

* fix: re-introduce NewMockSource for convenience

* fix: avoid circular dependency

* ref: increase usage of testify

* chore: vendor testify as a dependency

* fix(*): cleanup testify expectations
2017-05-31 10:24:11 +02:00
Martin Linkhorst
707bdc4d95 ref(*): remove superflous zone parameter (#212) 2017-05-22 15:38:27 +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
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
Martin Linkhorst
b0f437a438 support hostnames as endpoint targets (CNAME support) (#122)
* feat(aws): support hostnames as endpoint targets

* docs: describe how to run ExternalDNS on AWS

* docs: update changelog with CNAME feature

* docs: update changelog to include AWS documentation

* fix(aws): test that updating records removes the old value

* feat(google): add CNAME support to Google provider

* fix(source): sanitize source and target hostnames

* docs: update changelog to include latest changes

* docs(aws): mention that ExternalDNS takes full ownership of a hosted zone

* fix(aws): switch route53 tests to use endpoint pointers

* docs: add TODO to remove record filtering once ownership is in place
2017-04-05 14:58:10 +02:00
Yerken
f9402d7ed1 use pointer to endpoint via NewEndpoint initializer (#125)
* use pointer to endpoint via NewEndpoint initializer

* return nil if record does not exist in plan

* add test for NewEndpoint
2017-04-04 16:41:49 +02:00
Martin Linkhorst
318c6e532c ref(*): rename DNSProvider to just Provider (#101) 2017-03-17 14:35:10 +01:00