Commit Graph

570 Commits

Author SHA1 Message Date
Megum1n
70a43a4231
Merge branch 'master' into gloo-multiple-namespaces 2023-07-08 22:49:13 +02:00
Fredrik Larsson
712582caad Check len == 0 instead of nil 2023-07-06 11:36:34 +02:00
Fredrik Larsson
f8ae66efab Remove unnecessary test 2023-07-06 11:35:35 +02:00
Fredrik Larsson
76f8fbddcd Add tests for annotation override (gateway sources) 2023-07-05 09:52:26 +02:00
Fredrik Larsson
56eb581aa5 Allow annotation target override on gateway 2023-07-05 09:52:26 +02:00
John Gardiner Myers
4a40346d42 Remove flags and documentation for removed contour-ingressroute source 2023-07-04 16:37:37 -07:00
Fredrik Larsson
c4df1b18c9 Fix: File is not goimports-ed with -local 2023-07-01 14:11:49 +02:00
Christian Groschupp
33598b3c86 copy labels 2023-06-30 07:52:25 +02:00
Christian Groschupp
840338f77b add AAAA to test 2023-06-30 07:51:31 +02:00
Fredrik Larsson
3dbcb9cba1 Simplify interface implementation test for targetFilterSource 2023-06-29 22:38:17 +02:00
Fredrik Larsson
42dde17b1b Remove unneeded IsConfigured() method 2023-06-29 22:30:26 +02:00
Fredrik Larsson
05bb165ffa Run tests via a Mock targetNetFilter instead of the actual one 2023-06-29 22:28:14 +02:00
Fredrik Larsson
d7d5a2d404 Move echoSource into targetfiltersource_test.go 2023-06-29 22:28:14 +02:00
Fredrik Larsson
8533cb229a Fix file name spelling 2023-06-29 22:28:14 +02:00
Fredrik Larsson
e3fbc7eb30 Add logs 2023-06-29 22:28:14 +02:00
Fredrik Larsson
af7b072405 Filter out endpoints if targetfiltersource filters out all targets 2023-06-29 22:28:14 +02:00
Fredrik Larsson
98fe58b27e Add tests for targetfiltersource 2023-06-29 22:28:14 +02:00
Fredrik Larsson
6a33a653a1 Add echo source for testing 2023-06-29 22:28:14 +02:00
Christian Groschupp
fd8c42732d support cnames and aaaa for default-targets 2023-06-29 16:06:02 +02:00
Frederic Mereu
f9099b8bfc
feat: add support for external IP in ambassador host source 2023-06-26 13:40:41 +02:00
John Gardiner Myers
039f1a91fb refactor: simplify assignment to Service target list 2023-06-25 14:00:36 -07:00
John Gardiner Myers
4ee8bae85c refactor: don't iterate over load balancer if not using result 2023-06-25 12:28:23 -07:00
Megum1n
41d3de5364
Merge branch 'master' into gloo-multiple-namespaces 2023-06-24 02:11:35 +02:00
Kubernetes Prow Robot
ae0c06e3e6
Merge pull request #3648 from johngmyers/dynamodb
Add DynamoDB registry implementation
2023-06-23 13:03:07 -07:00
Michel Loiseleur
17ca22c309 fix test on istio 2023-06-19 11:22:41 +02:00
Michel Loiseleur
4da80b2ffb partial fix on istio 2023-06-19 10:06:05 +02:00
John Gardiner Myers
4417ad4894 Move EndpointKey to endpoints package 2023-06-18 16:47:37 -07:00
Michel Loiseleur
c9cf1e9e1f
Merge branch 'master' into deps/dependabot 2023-06-17 22:58:58 +02:00
Kubernetes Prow Robot
d468a339f0
Merge pull request #3686 from rumstead/fix/crashback-virtual-service-no-gateway
fix: extdns crashes when virtual service points to nonexistent …
2023-06-17 09:10:20 -07:00
rumstead
4dd3de68e7 fix: extdns crashes when virtual service points to nonexistent gateway
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

updating test

Update source/istio_virtualservice_test.go

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>

Update source/istio_virtualservice_test.go

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2023-06-17 10:36:38 -04:00
Kubernetes Prow Robot
8e2140baab
Merge pull request #3055 from ThomasK33/master
Add support for Traefik 2's IngressRoute, IngressRouteTCP and IngressRouteUDP
2023-06-16 13:08:19 -07:00
Michel Loiseleur
e06ed8cc5d build(deps): bump dev-dependencies group with 40 updates 2023-06-16 17:15:35 +02:00
Kubernetes Prow Robot
561273d386
Merge pull request #3476 from Megum1n/master
Gloo: Add support for listener.metadataStatic
2023-06-16 04:24:18 -07:00
Thomas Kosiewski
9105dc020b
Added missing GVKs for store tests
Signed-off-by: Thomas Kosiewski <thoma471@googlemail.com>
2023-06-14 18:27:39 +02:00
Thomas Kosiewski
bd67905307
Added support for new traefik CRDs
Signed-off-by: Thomas Kosiewski <thomas.kosiewski@loft.sh>
2023-06-14 18:08:10 +02:00
Kubernetes Prow Robot
e872bda5af
Merge pull request #3677 from kubernetes-sigs/refactor/use-error-wrapping
refactor: use always fmt.Errorf("...: %w", err), instead of %s or %v
2023-06-12 07:53:50 -07:00
Michel Loiseleur
7fa786733a review: remove seed and init() func 2023-06-12 12:10:49 +02:00
Sandor Szücs
dc069cc10f
refactor: use always fmt.Errorf("...: %w", err), instead of %s or %v
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2023-06-12 10:44:29 +02:00
Michel Loiseleur
de20b13879 add golangci-lint update 2023-06-09 12:04:58 +02:00
Thomas Kosiewski
f0ac655838
Style changes & fixes
Signed-off-by: Thomas Kosiewski <thoma471@googlemail.com>
2023-06-06 18:51:59 +02:00
Thomas Kosiewski
95abe994c4
Merge remote-tracking branch 'kubernetes-sigs/master' 2023-06-01 18:49:38 +02:00
megum1n
ca5d74d545
Add separate test for metadata static virtual host 2023-05-29 01:05:47 +02:00
Megum1n
bc7e1eddbe
Merge branch 'kubernetes-sigs:master' into master 2023-05-29 00:10:37 +02:00
Kubernetes Prow Robot
fd501ddd7c
Merge pull request #3600 from johngmyers/ipv6-headless
Support AAAA records from headless services
2023-05-19 06:44:30 -07:00
Kubernetes Prow Robot
8c1be68e87
Merge pull request #3603 from Pluggi/pod-multiple-internal-hostnames
Allow multiple hostnames in internal annotation for pods
2023-05-17 03:12:35 -07:00
Antoine Bardoux
b17506cfa3 Remove unnecessary trailing newline 2023-05-16 15:43:28 +02:00
Antoine Bardoux
f385139abc Allow multiple hostnames in internal annotation for pods 2023-05-12 12:16:08 +02:00
Gabriel Martinez
599590c141
add AAAA tests 2023-05-11 12:05:54 +01:00
Gabriel Martinez
9bbebf6c07
Merge remote-tracking branch 'remote/master' into target_annotation_for_service 2023-05-11 11:53:20 +01:00
John Gardiner Myers
47a0f74f61 Add test for IPv6 ExternalName service 2023-05-10 13:23:53 -07:00
John Gardiner Myers
41c705e471 Support AAAA records from headless services 2023-05-10 13:23:51 -07:00
Kubernetes Prow Robot
3a788d6a44
Merge pull request #3588 from johngmyers/ipv6-external
IPv6 internal node IPs are usable externally
2023-05-10 13:17:14 -07:00
John Gardiner Myers
4745ddbb0e Address review comment 2023-05-09 19:42:56 -07:00
Megum1n
028656d649
Change variable type and description 2023-05-08 12:08:00 +02:00
John Gardiner Myers
683663e9c2 IPv6 internal node IPs are usable externally 2023-05-07 12:00:28 -07:00
Gabriel Martinez
3288cc2f98
feat(service): allow using target annotation 2023-05-06 14:48:54 +01:00
Arnaud Lefray
42077cd35a
ingress: ignore annotation when ingressclassname is non empty 2023-05-05 16:08:04 +02:00
Arnaud Lefray
e9fd86035d
fix: add missing record check to ingress tests 2023-05-04 15:44:14 +02:00
Arnaud Lefray
56773c0430
chore: merge with master 2023-05-04 15:23:10 +02:00
Arnaud Lefray
4a2b9c60ab
ingress: improve ingress class name filter testing
Signed-off-by: Arnaud Lefray <arnaud.lefray@gmail.com>
2023-05-04 15:10:46 +02:00
megum1n
63c826f62b
Remove whitespaces 2023-04-20 15:50:58 +02:00
Charles Xu
1d232c4b86 feat: resolve LB-type Service hostname to create A/AAAA instead of CNAME 2023-04-18 21:10:56 -07:00
Kubernetes Prow Robot
e6ec8ea329
Merge pull request #2220 from ericrrath/crd-source-event-handler
CRD source: add event-handler support
2023-04-13 23:20:39 -07:00
megum1n
ac605fa4ce
Rename gloo-namespace flag back to singular word 2023-04-13 23:00:26 +02:00
John Gardiner Myers
781ee3d71f Address review comments 2023-04-12 22:46:39 -07:00
John Gardiner Myers
258986c7ce Add test case for extracting IPv6 from Ingress status 2023-03-30 17:49:31 -07:00
John Gardiner Myers
6b20ba301c Remove unnecessary unit test changes 2023-03-30 17:49:31 -07:00
John Gardiner Myers
de1db3f03d Unit test fixes 2023-03-30 17:49:31 -07:00
Skyler Mäntysaari
6f42a8a2da Initial IPv6 support 2023-03-30 17:49:28 -07:00
John Gardiner Myers
06227c1fbf Make unit tests more strict about record type 2023-03-30 17:47:59 -07:00
Thomas Kosiewski
f527b54e2e Fixed store tests 2023-03-17 15:24:48 +01:00
Thomas Kosiewski
6ba9d3b221 Fixed error thrown by linter 2023-03-17 15:16:22 +01:00
Thomas Kosiewski
2dcbb2cfd2 Removed traefik as dependency 2023-03-17 15:16:22 +01:00
Thomas Kosiewski
4ecad141c2 Added exemption for wildcard only route rule 2023-03-17 15:16:11 +01:00
Thomas Kosiewski
b7016a0f38 Added tests for traefik source 2023-03-17 15:16:11 +01:00
Thomas Kosiewski
6c25133bce Updated store_test & helm chart clusterrole 2023-03-17 15:16:11 +01:00
Thomas Kosiewski
458b702762 Added traefik source 2023-03-17 15:15:41 +01:00
megum1n
3d48d66c91
Add support for multiple gloo namespaces in one External DNS instance 2023-03-15 02:33:00 +01:00
Megum1n
041ca372c8 Gloo: Add support for listener.metadataStatic 2023-03-14 17:16:25 +01:00
Mikael Johansson
9a76be0202 Add F5 VirtualServer source 2023-03-14 10:23:56 +01:00
Eric R. Rath
929e618935 --events controls CRD informer creation
mgruener suggested that the --events flag could be wired to control whether or
not the CRD source created and started its informer.  This commit makes that
change; good idea!
2023-02-27 12:34:16 -08:00
Andy Bursavich
13d978caeb gateway-api: upgrade from v0.5.1 to v0.6.0 and add GRPCRoute support 2023-01-04 08:18:35 -08:00
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
Andy Bursavich
ad7e1509e0 gateway-api: patch route informer results with TypeMeta 2022-12-28 17:39:15 -08:00
Raffaele Di Fazio
31e6bb8578
CI linting fixes (#3205)
* ci linting fixes

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

* remove staticcheck

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

* disable naming rule

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

* disable stylecheck too

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

* linter errors fixes

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

* re-add staticcheck

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

* fixes various linting issues

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

* fix imports

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

* fix tlsconfig

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

* fix alibabacloud

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

* ioutil fixes

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

* remove all references to ioutil

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

* ignore linting for azure deprecated sdk

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

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
2022-12-02 10:57:53 -08:00
ricoberger
d56ad7f683 Fix deletion of DNS Records for VirtualServices on error 2022-11-10 18:12:42 +01:00
Mikael Johansson
b9996e2627 Fix minor typo 2022-10-22 13:16:06 +02:00
Andy Bursavich
b0dc1739aa gateway-api: switch to v1beta1 apis where available 2022-09-21 09:01:30 -07:00
Andy Bursavich
a7a56b9380 gateway-api: upgrade from v0.4.3 to v0.5.0 2022-09-21 09:01:30 -07:00
Andy Bursavich
74ffff6c26 gofumpt 2022-09-20 20:48:57 -07:00
Ole Markus With
a1a9091cdf Ignore ambassador-hosts with invalid annotations
If e.g the ambassador service annotation points to an nonexisting service, external-dns will not update any DNS records. This PR makes external-dns ignore the host and carry on instead.
2022-09-07 19:38:36 +02:00
Ole Markus With
594519a09b Add test for ambassador source failing to fetch ambassador service 2022-09-07 19:38:25 +02:00
Kubernetes Prow Robot
e2b86a1146
Merge pull request #2693 from tobikris/add-target-net-filter
add target filters based on network
2022-08-02 01:38:15 -07:00
Kubernetes Prow Robot
de1db79bad
Merge pull request #2707 from hughhuangzh/add_ibmcloud_provider
Add IBM Cloud provider
2022-05-26 01:39:23 -07:00
Kubernetes Prow Robot
66e0d8c7fe
Merge pull request #2292 from abursavich/gateway-redo
Add Support for Gateway API Route Sources
2022-05-25 01:20:44 -07:00
Kubernetes Prow Robot
379fe6f554
Merge pull request #2215 from abursavich/istio-informer
Istio: Use existing VirtualService informer
2022-05-12 05:33:14 -07:00
hzhihui
2270904b9d
Merge branch 'master' into add_ibmcloud_provider 2022-05-09 19:24:03 +08:00
Alfred Krohmer
ea45b03972 Headless service: allow to specify target as NodeExternalIP or by annotation
If external-dns.alpha.kubernetes.io/target annotation is present on a
pod, it's value will be used as the target for the headless service.

If annotation external-dns.alpha.kubernetes.io/access=public is present,
NodeExternalIP of the node running the pod is used as the target for the
headless service.
2022-05-05 19:44:32 +02:00
hzhihui
090270e89f
Merge branch 'master' into add_ibmcloud_provider 2022-04-28 09:11:15 +08:00
Kubernetes Prow Robot
042654c4cf
Merge pull request #2538 from mcwarman/istio-gateway-logging
istio-gateway: Add debug logging when endpoints missing
2022-04-27 01:00:11 -07:00
hzhihui
4703c11741 Add IBM Cloud provider 2022-04-14 11:53:16 +08:00
Tobias Krischer
692f2bbc23
add target filters based on network 2022-04-08 19:29:58 +02:00
Andy Bursavich
4371589a14 gateway: enforce listener matching 2022-02-24 21:33:53 -08:00
Andy Bursavich
71e45ce1d3 gateway-udproute: add source 2022-02-24 21:30:10 -08:00
Andy Bursavich
52e3fd61db gateway-tcproute: add source 2022-02-24 21:30:10 -08:00
Andy Bursavich
32ca4e6de8 gateway-tlsroute: add source 2022-02-24 21:30:10 -08:00
Andy Bursavich
3a1d86be20 gateway-httproute: add source 2022-02-24 21:30:10 -08:00
Andy Bursavich
48203e64c9 source: add gateway client 2022-02-24 21:30:10 -08:00
Andrey Lebedev
a53498735b openshift route source: better use of route status 2022-02-21 13:26:50 +01:00
Dave Salisbury
99c10f56c6 ingress source: improve mutual exclusive error message 2022-02-14 16:37:28 +11:00
Dave Salisbury
1ceec80ec5 Merge remote-tracking branch 'origin/master' into ingress-class-filtering 2022-02-14 16:36:26 +11:00
Eric R. Rath
56a8d60fff Review feedback
njuettner suggested using a var instead of boolean literals for the
startInformer arg to NewCRDSource; good idea.
2022-02-04 15:36:29 -08:00
Eric R. Rath
585d752ca4 Don't run CRD informer during tests
This change disables the CRD source's informer during tests.  I made the mistake
of not running `make test` before the previous commit, and thus didn't realize
that leaving the informer enabled during the tests introduced a race condition:

	WARNING: DATA RACE
	Write at 0x00c0005aa130 by goroutine 59:
	  k8s.io/client-go/rest/fake.(*RESTClient).do()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/fake/fake.go:113 +0x69
	  k8s.io/client-go/rest/fake.(*RESTClient).do-fm()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/fake/fake.go:109 +0x64
	  k8s.io/client-go/rest/fake.roundTripperFunc.RoundTrip()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/fake/fake.go:43 +0x3d
	  net/http.send()
		  /usr/local/go/src/net/http/client.go:251 +0x6da
	  net/http.(*Client).send()
		  /usr/local/go/src/net/http/client.go:175 +0x1d5
	  net/http.(*Client).do()
		  /usr/local/go/src/net/http/client.go:717 +0x2cb
	  net/http.(*Client).Do()
		  /usr/local/go/src/net/http/client.go:585 +0x68b
	  k8s.io/client-go/rest.(*Request).request()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/request.go:855 +0x209
	  k8s.io/client-go/rest.(*Request).Do()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/request.go:928 +0xf0
	  sigs.k8s.io/external-dns/source.(*crdSource).List()
		  /Users/erath/go/src/github.com/ericrrath/external-dns/source/crd.go:250 +0x28c
	  sigs.k8s.io/external-dns/source.NewCRDSource.func1()
		  /Users/erath/go/src/github.com/ericrrath/external-dns/source/crd.go:125 +0x10a
	  k8s.io/client-go/tools/cache.(*ListWatch).List()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/listwatch.go:106 +0x94
	  k8s.io/client-go/tools/cache.(*Reflector).ListAndWatch.func1.1.2()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/reflector.go:233 +0xf4
	  k8s.io/client-go/tools/pager.SimplePageFunc.func1()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/pager/pager.go:40 +0x94
	  k8s.io/client-go/tools/pager.(*ListPager).List()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/pager/pager.go:91 +0x1f4
	  k8s.io/client-go/tools/cache.(*Reflector).ListAndWatch.func1.1()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/reflector.go:258 +0x2b7

	Previous write at 0x00c0005aa130 by goroutine 37:
	  k8s.io/client-go/rest/fake.(*RESTClient).do()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/fake/fake.go:113 +0x69
	  k8s.io/client-go/rest/fake.(*RESTClient).do-fm()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/fake/fake.go:109 +0x64
	  k8s.io/client-go/rest/fake.roundTripperFunc.RoundTrip()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/fake/fake.go:43 +0x3d
	  net/http.send()
		  /usr/local/go/src/net/http/client.go:251 +0x6da
	  net/http.(*Client).send()
		  /usr/local/go/src/net/http/client.go:175 +0x1d5
	  net/http.(*Client).do()
		  /usr/local/go/src/net/http/client.go:717 +0x2cb
	  net/http.(*Client).Do()
		  /usr/local/go/src/net/http/client.go:585 +0x68b
	  k8s.io/client-go/rest.(*Request).request()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/request.go:855 +0x209
	  k8s.io/client-go/rest.(*Request).Do()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/rest/request.go:928 +0xf0
	  sigs.k8s.io/external-dns/source.(*crdSource).List()
		  /Users/erath/go/src/github.com/ericrrath/external-dns/source/crd.go:250 +0x28c
	  sigs.k8s.io/external-dns/source.(*crdSource).Endpoints()
		  /Users/erath/go/src/github.com/ericrrath/external-dns/source/crd.go:171 +0x13c4
	  sigs.k8s.io/external-dns/source.testCRDSourceEndpoints.func1()
		  /Users/erath/go/src/github.com/ericrrath/external-dns/source/crd_test.go:388 +0x4f6
	  testing.tRunner()
		  /usr/local/go/src/testing/testing.go:1193 +0x202

	Goroutine 59 (running) created at:
	  k8s.io/client-go/tools/cache.(*Reflector).ListAndWatch.func1()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/reflector.go:224 +0x36f
	  k8s.io/client-go/tools/cache.(*Reflector).ListAndWatch()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/reflector.go:316 +0x1ab
	  k8s.io/client-go/tools/cache.(*Reflector).Run.func1()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/reflector.go:177 +0x4a
	  k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1()
		  /Users/erath/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:155 +0x75
	  k8s.io/apimachinery/pkg/util/wait.BackoffUntil()
		  /Users/erath/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:156 +0xba
	  k8s.io/client-go/tools/cache.(*Reflector).Run()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/reflector.go:176 +0xee
	  k8s.io/client-go/tools/cache.(*Reflector).Run-fm()
		  /Users/erath/go/pkg/mod/k8s.io/client-go@v0.18.8/tools/cache/reflector.go:174 +0x54
	  k8s.io/apimachinery/pkg/util/wait.(*Group).StartWithChannel.func1()
		  /Users/erath/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:56 +0x45
	  k8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1()
		  /Users/erath/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:73 +0x6d

	Goroutine 37 (running) created at:
	  testing.(*T).Run()
		  /usr/local/go/src/testing/testing.go:1238 +0x5d7
	  sigs.k8s.io/external-dns/source.testCRDSourceEndpoints()
		  /Users/erath/go/src/github.com/ericrrath/external-dns/source/crd_test.go:376 +0x1fcf
	  testing.tRunner()
		  /usr/local/go/src/testing/testing.go:1193 +0x202

It looks like client-go's fake.RESTClient (used by crd_test.go) is known to
cause race conditions when used with informers:
<https://github.com/kubernetes/kubernetes/issues/95372>.  None of the CRD tests
_depend_ on the informer yet, so disabling the informer at least allows the
existing tests to pass without race conditions.  I'll look into further changes
that 1) test the new event-handler behavior, and 2) allow all tests to pass
without race conditions.
2022-02-04 15:32:03 -08:00
Eric R. Rath
5146dab6fa ran goimports on crd.go to fix linter warning 2022-02-04 15:27:36 -08:00
Eric R. Rath
d9bf8fb329 CRD source: add event-handler support
When the --events flag is passed at startup, Source.AddEventHandler() is called
on each configured source.  Most sources provide AddEventHandler()
implementations that invoke the reconciliation loop when the configured source
changes, but the CRD source had a no-op implementation.  I.e. when a custom
resource was created, updated, or deleted, external-dns remained unware, and the
reconciliation loop would not fire until the configured interval had passed.

This change adds an informer (on the CRD specified by --crd-source-apiversion
and --crd-source-kind=DNSEndpoint), and a Source.AddEventHandler()
implementation that calls Informer.AddEventHandler().  Now when a custom
resource is created, updated, or deleted, the reconciliation loop is invoked.
2022-02-04 15:27:36 -08:00
Matthew Warman
b79dc1e894 istio-gateway: Add debug logging when endpoints missing 2022-01-24 12:55:09 +00:00
Andrey Lebedev
4f41229820 Pass stop channel to informer factory instances 2022-01-22 21:31:29 +01:00
Dave Salisbury
097df5c458 Merge remote-tracking branch 'origin/master' into ingress-class-filtering 2021-12-28 14:27:30 +11:00
Michael Gruener
b8a08512e9 Add event handler for OpenShift Route source 2021-11-22 15:16:13 +01:00
Kubernetes Prow Robot
9cf3d4906c
Merge pull request #2400 from miheer/add-router-field-for-ocpRouteSource
Fix CNAME record when multiple router canonical name are defined in Route Status.
2021-11-19 05:50:52 -08:00
Kubernetes Prow Robot
39931b7cb0
Merge pull request #2259 from mper0003/issue-2245
service: fix merging of endpoints - same hostname different set-identifier
2021-11-03 04:32:58 -07:00
Miheer Salunke
ab8a62045e In OCP when you have multiple ingress controllers the route's status Ingress object get populated with multiple router canonical names. So in this case, the external dns tries to add multiple CNAME records for same host in the same hosted zone which is a violation of RFC 1912  and therefore is rejected by standards-compliant DNS services.
This feature adds a router field to the OCP Route Source so that a user can add an ingress controller name in flag --ocp-router-name which will be used to pick up the respective routerCanonicalHostname from Route's Status Ingress Object.

Signed-off-by: Miheer Salunke <miheer.salunke@gmail.com>
2021-11-03 12:52:57 +10:00
Dave Salisbury
b8cbd4bbf4 Merge remote-tracking branch 'origin/master' into ingress-class-filtering 2021-10-25 11:18:56 +11: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
Dave Salisbury
31bc5bb077 ingress source: fix broken NewIngressSource test
and add an extra one for the mutual exclusivity of ingressClassNames and
ingress.class annotationFilters
2021-10-02 17:08:54 +10:00
Dave Salisbury
6c4a450b25 gofmt simplify new ingress-class changes 2021-10-02 16:54:42 +10:00
Dave Salisbury
0aa3d55450 ingress source: pass back err when requirement fails 2021-10-02 16:50:35 +10:00
Dave Salisbury
a24217a720 ingress source: use shorthand bool comparison 2021-10-02 16:49:51 +10:00
Dave Salisbury
901effbca5 ingress source: ingressClassNames now feed into annotation filter 2021-10-02 16:32:40 +10:00
Dave Salisbury
71a672fe72 ingress source: check for duplicate classname configs
we don't want to get incompatible restrictions by letting someone set
"--ingress-class" and --annotation-filter="kubernetes.io/ingress.class"
at the same time
2021-10-02 16:09:50 +10:00
Dave Salisbury
ac0c4be36a Update tests for ingress class filtering 2021-10-02 15:23:48 +10:00
Dave Salisbury
8da6f99857 Rename ingressClassNameFilter to ingressClassNames
...and update the help text to specify use more clearly
2021-10-02 15:22:01 +10:00
Dave Salisbury
da71b3fff8 ingress source: improve class name filtering and logging 2021-10-02 15:13:45 +10:00
Dave Salisbury
c823eba139 ingress source: update code for networkv1 2021-10-02 14:34:34 +10:00
Dave Salisbury
115e2501af Add ingressClassNameFilter testing 2021-10-02 14:29:34 +10:00
Dave Salisbury
c4898b7e98 Plumb in filtering on ingress class name 2021-10-02 14:29:34 +10:00
Andrew Stuart
0e27f41fa0
Update external-dns to use v1 ingress 2021-09-08 09:29:05 -07:00
Marlene
85c2d278ab
update test 2021-08-29 17:26:21 +10:00
Marlene
c1af8a40ec
do not merge endpoints with different set identifier 2021-08-29 16:25:55 +10:00
Raffaele Di Fazio
9d5f721209 delete one more file
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2021-08-12 17:19:22 +02:00
Raffaele Di Fazio
d82bee2b53 Merge branch 'master' into raffo/bump-modules
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2021-08-12 16:28:30 +02:00
Raffaele Di Fazio
3e8b5effd8 changes to contour
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2021-08-12 16:09:24 +02:00
Raffaele Di Fazio
5c7ddb07c2 drop more concour
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2021-08-12 14:12:44 +02:00
Raffaele Di Fazio
05cadcb340 remove contour ingressroute
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2021-08-12 14:08:02 +02:00
Raffaele Di Fazio
17d06f4a88 remove comments
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2021-08-12 09:56:53 +02:00
Andy Bursavich
85f8d9e2cf istio: use existing VirtualService informer 2021-08-11 07:40:14 -07:00
Raffaele Di Fazio
b18e723ff2 save
Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2021-08-11 14:46:30 +02:00
Raffaele Di Fazio
376d4653d8 remove kubernetes dependency
Signed-off-by: GitHub <noreply@github.com>
2021-08-10 13:48:11 +00:00
Andy Bursavich
60c649bf5c source: dedupe wait for cache sync
wait
2021-07-28 13:37:17 -07:00
Andy Bursavich
55637abbef source: dedupe event handlers 2021-07-28 13:36:35 -07:00
Andy Bursavich
b032f2864f source: dedupe template execution 2021-07-28 13:35:51 -07:00
Andy Bursavich
638194fccd source: dedupe template parsing 2021-07-28 07:46:35 -07:00
Andy Bursavich
5069c3f0fb source: name files consistently with their source name 2021-07-28 07:46:35 -07:00
Andy Bursavich
76108e1bde source: parallelize tests that wait for syncing 2021-07-26 12:40:15 -07:00
Andy Bursavich
6da9fdd2e2 source: remove NewFakeConfigStore one-liner 2021-07-26 12:40:15 -07:00
Andy Bursavich
53bb0594bf connector: run test server on any open port 2021-07-25 13:32:30 -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
Andy Bursavich
e0d42415ee source: fix flakes by sorting endpoint by dns names and targets 2021-07-21 11:50:28 -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
Kubernetes Prow Robot
67fad71451
Merge pull request #2095 from voro015/registry_aws-sd-map-fix
Fixed AWSSDRegistry nil labels map
2021-06-30 01:25:03 -07:00
Stephen Greene
d273066d6b source: Add ocproute source unit tests
source/ocproute_test.go:

New file for source/ocproute.go unit tests.

Inspired by the service source unit tests,
this commit adds basic unit tests to verify
basic functionality of the OCP route source.

Signed-off-by: Stephen Greene <sgreene@redhat.com>
2021-06-28 11:34:00 -04:00
Stephen Greene
b05df8b388 source: Clean up OpenShift Route source
source/ocproute.go:

Add/clean up godocs and general in-line comments.

Change `routeapi` named import to `routev1`.
Update `routev1` calling sites accordingly.

Signed-off-by: Stephen Greene <sgreene@redhat.com>
2021-06-28 11:23:07 -04:00
Kubernetes Prow Robot
0148bca0f5
Merge pull request #2041 from olemarkus/kops
Kops compatibility mode
2021-06-24 06:25:41 -07:00
Ole Markus With
ba30810641 Use kops dns controller instead of just dns controller where it makes sense
Co-authored-by: Nick Jüttner <nick@juni.io>
2021-06-24 08:31:42 +02:00
Artem Voronin
0aae14288c Added test for node with nil labels 2021-06-23 22:01:09 +03:00
Kubernetes Prow Robot
c78be00600
Merge pull request #2109 from krmichel/master
Add support for Kong's TCPIngress with a load balancer
2021-06-23 11:34:10 -07:00
Kyle Michel
2b39eabe38
Apply suggestions from code review
Co-authored-by: Nick Jüttner <nick@juni.io>
2021-06-23 08:14:56 -04:00
Kubernetes Prow Robot
d29b4316e2
Merge pull request #2089 from bbl/master
Add the --default-targets flag
2021-06-23 01:22:10 -07:00
Ole Markus With
73469a0852 Support dns-controller compat mode for pod source 2021-06-23 09:06:38 +02:00
Ole Markus With
7a16ab46fa Add support for dns-controller compat mode for services 2021-06-23 09:06:38 +02:00
Kubernetes Prow Robot
2f78d09b47
Merge pull request #1696 from dansimone/dansimone/support-prefer-ingress-annotations
Optional ability to use the host name defined on an ingress's annotations *instead* of its hosts stanza
2021-06-14 02:13:04 -07:00
Artem Voronin
ea9158cbf2 Fixed node nil labels map with aws-sd registry 2021-06-02 18:47:20 +03:00
Kyle Michel
8676dda63f
Add support for Kong's TCPIngress with a load balancer 2021-05-26 21:04:07 -04:00
Bogdan
2476e77541 Add the --default-targets flag
This is a useful feature in environments
with public global WAN address(es)
2021-05-21 08:21:14 +02:00
dan.simone@oracle.com
963282479e Add clarifying comment about ingressHostnameSourceKey 2021-04-14 13:26:34 -07:00
dan.simone@oracle.com
03c3c8fcb8 Address remove comments 2021-04-14 13:21:03 -07:00
Kubernetes Prow Robot
9b1183fca7
Merge pull request #2032 from olemarkus/pod-source
Add pod source [kops compatibility]
2021-04-07 00:37:53 -07:00
Allen Porter
98284a94a5 Add unit test that exercises behavior of headless endpoint with no TargetRef. 2021-03-31 23:47:21 -07:00
Ole Markus With
5a46584221 Add pod source
Pod source is a key feature of kOps' DNS Controller.
Among other things, i is used for etcd and API discovery.
2021-03-31 15:48:41 +02:00
Allen Porter
a19deebe27 Avoid nil pointer deference in extractHeadlessEndpoints
Skip address when TargetRef is nil
2021-03-27 16:09:21 -07:00
Hugome
5221b1d525
feat: add gloo proxy source 2021-03-03 22:34:22 +01:00
Kubernetes Prow Robot
0f4b992d20
Merge pull request #1950 from polivbr/fix-virtualsvc-dup-endpoints
remove duplicate endpoints when processing VirtualService
2021-02-25 02:17:25 -08:00
Brett Polivka
5146c6e7e1 rename appendIfMissing to appendUnique and add comment 2021-02-17 15:32:08 +00:00
Brett Polivka
eb7c8491cb remove duplicate endpoints when processing VirtualService 2021-02-04 20:56:55 +00:00
Alvaro Saurin
6eeef96b14 Support Ambassador Host resources as sources
Ambassador can be configured with `Host` resources (based on the
`Host` CRD) for defining the external DNS host name.

This code adds a new source, `ambassador-host`, that looks for the
`ambassador/ambassador` Service and and uses the `hostname` from the
`Host` resource.

Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
Signed-off-by: Flynn <flynn@datawire.io>
2021-01-27 12:47:10 -05:00
Jaromir Vanek
94a50ada46 Correct format of SRV record for NodePort 2021-01-08 22:35:06 -08: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
Kubernetes Prow Robot
6a7fb3a9a7
Merge pull request #1425 from btoonk/internalhostname
feat: use ClusterIP with internal-hostname annotation
2020-12-23 05:56:26 -08:00
Bas Toonk
f3bbe97490 fix tests 2020-12-17 15:38:14 +01:00
Bas Toonk
18a60a5175 feat: use ClusterIP with internal-hostname annotation 2020-12-17 15:14:34 +01:00
bl-ue
84a23191b5 Fix typos
* fix typos

* fix special quote characters

* fix syntax highlighting in some code blocks
2020-12-13 10:03:14 -05: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
20703084c6 Tidy up the logic that constructs the final list of ingresses based on the hostname source annotation 2020-12-04 11:04:02 -08:00
dan.simone@oracle.com
d8d9275265 Merge remote-tracking branch 'origing/master' into dansimone/support-prefer-ingress-annotations 2020-12-04 10:47:29 -08:00
windayski
9f28aa9106 fix some typos 2020-11-30 10:23:19 +00:00
Kubernetes Prow Robot
764b944669
Merge pull request #1813 from ytsarev/crd-source-other-records
Add NS record support
2020-10-21 01:14:20 -07:00
Kubernetes Prow Robot
7639d72abb
Merge pull request #1446 from sagor999/share-dns-record
Allow multiple services to share same dns record
2020-10-16 02:53:25 -07:00
Pavel Tumik
f3b10ea054 update comment to explain edge case better 2020-10-15 06:54:15 -07:00