Commit Graph

66 Commits

Author SHA1 Message Date
Andy Bursavich
ac6ce47b99 Bump k8s.io/{api,apimachinery,clientgo} from v0.25.2 to v0.26.0 2023-01-04 08:15:59 -08:00
Andrey Lebedev
4f41229820 Pass stop channel to informer factory instances 2022-01-22 21:31:29 +01:00
Arjun Naik
d91b7e6b8f Label filtering for Ingress, Service, Openshift Route sources
Currently the `--label-filter` flag can only be used to filter CRDs
which match the label selector passed through that flag. This change
extends the functionality to the Ingress, Service and Openshift Route
type objects. When the flag is not specified the default value is
`labels.Everything()` which is an empty string, the same as before.
Annotation based filter is inefficient because the filtering has to be
done in the controller instead of the API server like with label
filtering.
2021-10-14 11:06:55 +02:00
Andrew Stuart
0e27f41fa0
Update external-dns to use v1 ingress 2021-09-08 09:29:05 -07:00
Andy Bursavich
60c649bf5c source: dedupe wait for cache sync
wait
2021-07-28 13:37:17 -07:00
Andy Bursavich
76108e1bde source: parallelize tests that wait for syncing 2021-07-26 12:40:15 -07:00
Andy Bursavich
f7a0539686 source: create test resources before sources 2021-07-25 13:32:30 -07:00
Andy Bursavich
eb2addb688 source: tests validate endpoint ProviderSpecific and SetIdentifier 2021-07-25 13:32:30 -07:00
Anand Patel
509a07c493
create new source ingress config option IgnoreIngressRulesSpec 2021-06-30 10:03:04 -07:00
Anand Patel
9bccccf414
add ignoreIngressRulesSpec for ingress source 2021-06-30 09:56:58 -07:00
dan.simone@oracle.com
03c3c8fcb8 Address remove comments 2021-04-14 13:21:03 -07:00
dan.simone@oracle.com
fa95e86fb1 Merge remote-tracking branch 'origing/master' into dansimone/support-prefer-ingress-annotations
# Conflicts:
#	docs/faq.md
2021-01-04 15:39:34 -08:00
Raffaele Di Fazio
f5aa1c4c37
Add new method to provider interface to implement provider specific changes (#1868)
* adds tests for shouldUpdateProviderSpecific

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* move AWS health to where it belongs

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* add test that breaks things

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>

* adds adjustendpoints method

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* fix controller

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* actually pass the provider where needed

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* OMG goland do your go fmt thing

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* use registry as proxy

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* make linter happy

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* change AdjustEndpoints signature

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* fix typo

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* actually use adjusted endpoints

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* revert cloudflare change

Signed-off-by: Raffaele Di Fazio <raffo@github.com>

* Update provider/cloudflare/cloudflare.go

Co-authored-by: Nick Jüttner <nick@juni.io>

Co-authored-by: Nick Jüttner <nick@juni.io>
2020-12-09 23:40:54 -08:00
dan.simone@oracle.com
87f291a548 Fix unit test 2020-09-25 16:07:05 -07:00
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