Commit Graph

52 Commits

Author SHA1 Message Date
dan.simone@oracle.com
4d88b47917 Resolve differences 2020-09-25 15:59:18 -07:00
Benjile
fefb1b2777 Optionally ignore tls rules in ingress source 2020-09-18 09:12:14 +02:00
dan.simone@oracle.com
f85cddab58 Change to an annotation-based approach, based on feedback 2020-07-29 11:51:27 -07:00
dan.simone@oracle.com
26274bd685 First pass - based on global flag 2020-07-29 11:42:45 -07:00
Joseph Glanville
6efca134f5 dependencies: Upgrade all k8s client-go dependent sources to v1.18.X
This requires pinning grpc for now as istio client-go otherwise pulls in
breaking changes.
2020-07-03 11:29:37 +07:00
Tom Dyas
808d992e65 update comment 2020-06-02 21:34:53 -07:00
Tom Dyas
c13ab9599f switch to scanning the informer cache in the source 2020-06-02 21:08:52 -07:00
Tom Dyas
c98bb4da29 increase test timeout to fix intermittent failures 2020-05-31 13:10:57 -07:00
Tariq Ibrahim
b1b46e7bec
use istio client-go and clean up k8s deps 2020-05-17 09:21:01 -07:00
Adam Stankiewicz
6e0abfaf42 Make tests faster by fast polling 2020-05-12 23:06:05 +02:00
Igor Zibarev
6e6af8aa0d Add support for human-friendly TTL values
Supports specifying TTL values in Golang duration format for
`external-dns.alpha.kubernetes.io/ttl` annotation.
2020-01-09 21:13:53 +03:00
Tariq Ibrahim
41ba7f1ff5
rename project root package to sigs.k8s.io 2020-01-06 08:08:35 -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
twilfong
0a7c3ba271 minor format change to make travis linter happy 2019-06-28 17:07:37 -07:00
twilfong
172747e578 add test for dualstack label to Ingress test 2019-06-28 10:40:58 -07:00
njuettner
76c09dab1f Switch to go modules 2019-04-09 17:22:36 +02:00
jlamillan
73d34db670
Use k8s informer cache instead of active API server calls in ingress and service sources. 2019-02-25 20:07:00 -08:00
Anand Patel
230113c7b8 Merge branch 'master' of github.com:kubernetes-incubator/external-dns into feature/ignore-annotations 2018-11-16 14:21:23 -03:00
Anand Patel
3454363d67 allow hostname annotations to be ignored 2018-10-17 17:17:15 -04:00
vaegt
bb80f99e17
Add alias annotation for ingress 2018-10-16 13:30:07 +02:00
shashidharatd
e26b73e73f Fix usage of k8s.io/client-go package 2018-07-31 23:02:03 +05:30
Rodrigo Menezes
aa8d04f18c Fix for empty target annotation. (#647)
* Fix for empty target annotation.

* add test
2018-07-26 19:33:50 +02:00
Yurii Soldak
044f2b9ac7 formatting (gofmt -s -w ./source/ingress_test.go) 2018-06-21 13:56:55 +02:00
Yurii Soldak
ffaf04a841 read hostnames from spec.tls.hosts in ingress resource, fixes #610 2018-06-21 13:34:40 +02:00
Rajat Jindal
c2751f81cf add support for hostname annotation in ingress resource (#545)
* add support for hostname annotation in ingress resource

* implement getHostnamesFromAnnotations and use that in ingress/service
2018-05-08 16:13:19 +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
Helgi Þormar Þorbjörnsson
321d4d463b Support a comma separated list for the FQDN template (#512)
* Support a comma separated list for the FQDN template

* Add documentation for comma separated FQDN templates

* chore: add multiple fqdn templates to changelog
2018-04-04 11:39:39 +02: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
Yerken
ec07f45c8e Multi target plan ( Page Not Found ) (#404)
* Make suitableType() be Endpoint method

With this change it becomes possible to work with endpoint
of empty type in packages other than "provider". Also
it seems logical for a smart property getter without side effects
to be a method rather than a function in different package

* Make plan computation work correctly with multi-target domains

* fix drawing

* drop comments

* fix boilerplate header

* fix comment

* fix the bug with empty map

* rework registry to support random lables

*  serialize->serializeLabel function rename

* golint for err variable naming

* add additional test

* add tests for current case where one resource can generate multiple endpoints

* make labels have its own type, add serialization as a method

* add comment for exported error

* use greater rather than not equal zero

* update changelog
2017-12-14 11:21:07 +01: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
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
Seth Pollack
826a27fddd Add suitableType for ingress (#325)
* fix ingress

* add tests for detecting type for target annotation
2017-08-30 17:13:54 +02:00
Clayton O'Neill
ea4cbfe803 Ingress target annotation should set, not append (#318)
If the user has specified a target for the ingress, treat that as
overriding any endpoints already set on the ingress, even if that list
is not empty.  This allows overriding the IP address or hostname set
when using a service like kube-keepalived-vip.
2017-08-17 22:27:14 +02:00
Henning Jacobs
d54cd72e94 Support for annotation based targets for Ingress (#312)
* Support for annotation based targets for Ingress

* stay DRY: extract into addEndpointsFromTargetAnnotation
2017-08-10 20:53:22 +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
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
8b8312c89a update and vendor all dependencies (#200)
* chore: update and vendor all dependencies

* chore: don't forget custom import repo-infra
2017-05-11 11:09:49 +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
Yerken
be452acdf7 endpoint sanitize dns in the init func (#131)
* revert changes, start a new

* remove sanitize

* fix tests for source pkg

* fix aws_tests
2017-04-07 10:18:52 +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
f3c1d0f770 fix(source): ingresses should be ignored if other controller (#108) 2017-03-23 16:33:44 +01:00
Martin Linkhorst
08d752c592 Ingress: appends trailing dot to hostnames (#85)
* fix(ingress): append trailing dot to hostnames

* fix(source): update tests for sanitized DNS names
2017-03-14 10:54:24 +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
Martin Linkhorst
b29e7343e1 fix(source): validate that sources adhere to the interface (#80) 2017-03-13 12:39:57 +01:00
Martin Linkhorst
78a2b1d8d5
feat: allow passing a namespace that limits found resources 2017-03-06 16:41:14 +01:00
ideahitme
0115c2007d test ingress on diff namespaces 2017-03-02 16:57:29 +01:00
ideahitme
d9697c0463 gofmt ingress_test 2017-03-02 15:26:17 +01:00
ideahitme
c14b4107f0 ingress tests 2017-03-02 15:14:37 +01:00
ideahitme
43e11ea66b scoped ingress tests 2017-03-02 11:34:01 +01:00