Commit Graph

505 Commits

Author SHA1 Message Date
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
Yury Tsarev
904d8e4c87 NS record support 2020-10-12 20:23:17 +02:00
Pavel Tumik
0b4b4e45f4 Allow multiple services to share same dns record 2020-09-28 19:01:01 -07: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
João Marçal
79ea64884b
Added labelFilter for source CRD (#1461)
* Added label filter for source CRD

* Fixed bug with labels and added tests for source CRD

* Fixed formating

* Update source/crd_test.go

Co-authored-by: Vinny Sabatini <vincent.sabatini@gmail.com>

Co-authored-by: Vinny Sabatini <vincent.sabatini@gmail.com>
2020-09-24 01:28:05 -07:00
Kubernetes Prow Robot
32fedeaf07
Merge pull request #1645 from Caascad/ignore_tls_rules
Optionally ignore tls rules in ingress source
2020-09-24 01:12:05 -07:00
Kubernetes Prow Robot
3c50299a9c
Merge pull request #1500 from burningalchemist/loadbalancer-externalip
Publish ExternalIPs for LoadBalancer services
2020-09-21 10:34:32 -07:00
Benjile
fefb1b2777 Optionally ignore tls rules in ingress source 2020-09-18 09:12:14 +02:00
rbtr
54320a16ab
add doc and test 2020-09-16 12:02:19 -04:00
Evan Baker
b75151e3e5
add service annotation to set public/private iface for NodePort
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
2020-09-16 11:56:49 -04:00
Sergei Zyubin
cc6a1fb3e7
Add test for LoadBalancer and ExternalIPs 2020-09-12 12:04:07 +02:00
Sergei Zyubin
d06dff145c
Add externalIPs for LoadBalancer type 2020-09-12 12:04:07 +02:00
Kubernetes Prow Robot
0947994d37
Merge pull request #1628 from josephglanville/jpg/contour-httpproxy
Contour HTTPProxy support
2020-09-07 06:27:42 -07:00
codearky
53c0cf951d
Remove duplication of external ips when ExternalTrafficPolicy set to … (#1744)
* Remove duplication of target ips for NodePort services with ExternalTrafficPolicy=Local

* Removed trailing lines
2020-09-02 11:33:06 -07:00
dan.simone@oracle.com
4cb5a85dd4 Merge remote-tracking branch 'origing/master' into dansimone/support-prefer-ingress-annotations 2020-08-27 12:16:05 -07:00
Joseph Glanville
1640905a03 Address review comments 2020-08-22 18:37:26 +07:00
Tariq Ibrahim
6ec6e3d88e
add license header check to the CI 2020-08-21 15:54:49 -07:00
Tariq Ibrahim
600f4f1ba0
fix goimports local import order and update golangci-lint 2020-08-19 20:05:07 -07:00
Patrik Cyvoct
b1f6c1fa0e
fix scw annotations
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-08-19 06:41:47 +02:00
Kubernetes Prow Robot
8bef3758c7
Merge pull request #1625 from haines/ignore-wildcard-hosts-in-istio-gateways
Ignore wildcard hosts in Istio gateways
2020-08-18 02:53:29 -07:00
Tariq Ibrahim
58ceebec73
add event handler for istio gateway and virtualservice source 2020-08-18 00:18:27 -07:00
Joseph Glanville
5beb528c32 Contour HTTPProxy support 2020-08-06 18:56:59 +07: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
Andrew Haines
d69d191ea2
Allow hostnames to be specified by annotations for gateways with wildcard hosts 2020-07-14 09:21:44 +01:00
Andrew Haines
734cb7c4ae
Ignore wildcard hosts in Istio gateways 2020-07-14 09:21:44 +01:00
Raffaele Di Fazio
7505f29e4c
Remove occurrences of "master" from the project (#1636)
* intial removal of inappropriate terminology

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

* removed other occurrences

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

* gofmt

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

* addresses comment

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

* gofmt

Signed-off-by: Raffaele Di Fazio <raffo@github.com>
2020-07-08 01:13:08 -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
Kubernetes Prow Robot
a11414fa3b
Merge pull request #1607 from tariq1890/add_vs
add new source for istio virtual services
2020-07-01 00:46:17 -07:00
Tariq Ibrahim
c2788b2735
add new source for istio virtual services
Co-authored-by: Alfred Krohmer <alfred.krohmer@logmein.com>
Co-authored-by: Jonas-Taha El Sesiy <github@elsesiy.com>
2020-06-29 13:19:50 -07:00
Tariq Ibrahim
96cffaff93
rm unused flag param istio-ingressgateways 2020-06-26 17:13:26 -07:00
Kubernetes Prow Robot
6cc11d0333
Merge pull request #1612 from tdyas/increase_test_timeout
increase test timeout to fix intermittent failures of ingress tests
2020-06-14 01:13:55 -07:00
Nick Jüttner
3388e3ddf1 improve linter quality for external-dns 2020-06-06 22:29:24 +02: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
Kubernetes Prow Robot
deaeca2ab1
Merge pull request #1575 from tariq1890/istio_dupl
remove some code duplication in gateway source
2020-05-25 14:07:11 -07:00
Adam Stankiewicz
1806ade2c1 Fix scheduling of reconciliation 2020-05-19 17:26:12 +02:00
Tariq Ibrahim
6c5eb30a72
remove some code duplication in gateway source 2020-05-18 14:10:39 -07:00
Tariq Ibrahim
b1b46e7bec
use istio client-go and clean up k8s deps 2020-05-17 09:21:01 -07:00
Kubernetes Prow Robot
b0eaca1c73
Merge pull request #1569 from stevesloka/updateContourIngressRoute
update Contour IngressRoute deps
2020-05-16 02:37:36 -07:00
Steve Sloka
5c565dace7 update Contour IngressRoute deps
Signed-off-by: Steve Sloka <slokas@vmware.com>
2020-05-14 15:07:34 -04:00
Adam Stankiewicz
6e0abfaf42 Make tests faster by fast polling 2020-05-12 23:06:05 +02:00
Lucas Servén Marín
a54ee2da37
*: fix goreportcard golint warnings
This commit applies fixes for the golint warnings shown on goreportcard.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2020-05-07 17:22:36 +02:00
Kubernetes Prow Robot
e515b835ca
Merge pull request #1513 from tariq1890/rm_k8s
remove dependency on kubernetes/kubernetes
2020-04-21 03:24:55 -07:00
Kubernetes Prow Robot
3ce5701fd5
Merge pull request #1484 from porscheinformatik/ocproute
Support for openshift routes
2020-04-20 11:59:40 -07:00
Tariq Ibrahim
42b177c5ae
remove dependency on kubernetes/kubernetes 2020-04-11 11:36:57 -07:00
Johannes Grumböck
cdfd7f2da5 Use RouterCanonicalHostname to avoid CNAME-loops 2020-04-09 13:23:21 +00:00
Johannes Grumböck
d3cb632659 gofmt to remediate goimports'ed linting errors 2020-04-07 07:57:54 +00:00
Johannes Grumböck
7b89849bf4 Some comments 2020-04-07 06:49:10 +00:00
Johannes Grumböck
acd32c237a Fixed fmt logoutput 2020-04-02 06:00:23 +00:00
Johannes Grumböck
76851b809f fixed sync cache 2020-04-02 06:00:23 +00:00
Johannes Grumböck
228be31b3e Added empty eventhandler 2020-04-02 05:59:04 +00:00
Johannes Grumböck
d476efb02c Add OpenShift route as possible source 2020-04-02 05:59:04 +00:00
Yury Tsarev
d432625168 Implement annotation filter for CRD source
* Ability to use `--annotation-filter` for CRD source
* Use case is similar to https://github.com/kubernetes-sigs/external-dns/blob/master/docs/faq.md#running-an-internal-and-external-dns-service
  but for CRD source, effectively DNSEndpoints instead of Ingresses
2020-03-28 00:21:25 +01:00
Sandor Szücs
fe0e0c1250
fix: return early if tokenfile could not be read
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2020-03-09 13:45:06 +01:00
Sandor Szücs
116856f422
implement RouteGroup with similar feature set to ingress
add documentation for kube-ingress-aws-controller and RouteGroup

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2020-03-05 17:14:30 +01:00
Martin Linkhorst
819b2303d8 fix: change test field to compile again 2020-03-05 15:05:31 +01:00
Kubernetes Prow Robot
a563022e8a
Merge pull request #1005 from devkid/feature/headless-services-publishnotreadyaddresses
Headless service: retrieve endpoints via Endpoints resource; evaluate spec.publishNotReadyAddresses
2020-03-04 05:37:46 -08:00
Alfred Krohmer
65208db6ec Address review comments 2020-02-18 20:18:56 +01:00
Alfred Krohmer
6cab35b404 Add CLI option to always publish not ready addresses of headless services 2020-02-18 19:43:41 +01:00
Alfred Krohmer
de28274a6f Headless service: retrieve endpoints via Endpoints resource; evaluate spec.publishNotReadyAddresses
Currently, the endpoints of headless services are retrieved
by querying pods using the pod selector of the service.
Instead, we now query for an Endpoints resource with the
same name as the Service object to get the endpoints for the
service. This is needed in order to support the
spec.publishNotReadyPods attribute of a service.
2020-02-18 19:41:41 +01:00
Thomas Vendetta
9842cfab29
Use struct instead of bool 2020-02-18 11:45:01 -05:00
Thomas Vendetta
d31890f12d
Fix issue where headless services could return duplicate pod IP's 2020-02-13 09:47:18 -05:00
Kubernetes Prow Robot
829ed01e1e
Merge pull request #1237 from hypnoglow/ttl-duration
Add support for human-friendly TTL values
2020-02-04 06:27:26 -08:00
Kubernetes Prow Robot
d49d901d8a
Merge pull request #687 from jlamillan/jlamillan/add_watch_flag
Add --watchers flag to allow controller to respond automatically to Ingress or Service updates
2020-02-04 02:23:25 -08: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
Tariq Ibrahim
394f46cd64
uprade golangci-lint and add megacheck & interface linters 2020-01-23 14:49:23 -08: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
bf4b1767fa
add more linters and improve code quality 2020-01-07 15:18:00 -08:00
Tariq Ibrahim
41ba7f1ff5
rename project root package to sigs.k8s.io 2020-01-06 08:08:35 -08:00
fcarletti
9aee917964
fix: use ingress gateway service as target instead of hard-coded ones 2019-12-23 10:33:01 +01:00
njuettner
0d50f6c0d9 Fix linter flaws 2019-11-26 15:40:17 +01:00
Nick Jüttner
9418e3acd8
Merge pull request #1008 from devkid/feature/aws-routing-policies
[RFC] Add support for all AWS Route53 routing policies; add additional Setldentifier abstraction layer
2019-11-19 11:21:12 +01:00
Zhang Jinghui
b318f666ba normalize function return and comments on exported type 2019-11-14 23:55:18 +08:00
Tim Jacomb
6414a39890 Address review comments 2019-11-03 07:49:59 +01:00
saidst
dda6a331b3 Changed dependency to k8s.io-libs entirely to kubernetes-1.13.11. 2019-11-03 07:49:56 +01:00
Tim Jacomb
f170849b42 It compiles! 2019-11-03 07:49:44 +01: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
Reinier Schoof
0c547a9809 added description to exported function 2019-10-25 16:25:02 +02:00
Reinier Schoof
5667d0b14e remove obsolete comment 2019-10-25 16:00:38 +02:00
Reinier Schoof
b6ec8557ae honor ttlAnnotationKey for node endpoints 2019-10-24 17:02:29 +02:00
Reinier Schoof
fee7046e72 error when no node address could be found 2019-10-24 16:22:31 +02:00
Martin Linkhorst
02f40d787a source: group equal DNS names into same endpoint 2019-10-24 11:21:06 +02:00
Reinier Schoof
4325d7368b respect controller annotation for node source 2019-10-01 11:39:09 +02:00
Reinier Schoof
16194ca9cf implemented annotationFilter for node source 2019-10-01 11:26:47 +02:00
Reinier Schoof
a491d8f6a2 added support for using nodes as source 2019-10-01 09:27:06 +02:00
Bjørn Sørensen
2bfa8d95d9 Fix build errors 2019-09-10 20:51:45 +02:00
Alfred Krohmer
b2a3e88303 Fixes and cleanup 2019-09-10 20:47:36 +02:00
Kubernetes Prow Robot
74582eff6c
Merge pull request #1107 from JoaoBraveCoding/source-crd-improvements
Improvements to the source CRD
2019-09-10 03:04:55 -07:00
João Marçal
d35633b47f Fixed identation
Signed-off-by: João Marçal <joao.marcal12@gmail.com>
2019-08-22 17:21:00 +02:00
João Marçal
4dc7e75530 Added the requested changes
Signed-off-by: João Marçal <joao.marcal12@gmail.com>
2019-08-19 16:14:01 +02:00
Jonas Michel
c0c3d25b45 Support delegate Contour IngressRoutes 2019-08-16 10:36:41 -05:00
Daniel Herman
38a2040759 fix: support namespaces on the hostnames in istio gateway
One feature that's supported for the Istio Gateway resource is the
ability to restrict what namespace may provide a VirtualService for
a given hostname/domain by specifying it in the form
`my-namespace/my-domain.com` which restricts the availability of
`my-domain.com` to the `my-namespace` namespace.

When creating the associated DNS records, the namespace should not
be included.
2019-08-07 13:07:53 -04: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
Myles Gray
231d0701aa Changed ttlMaximum to MaxInt32 to allow compilation on 32bit machines
In its current state, ttlMaximum causes make to fail build with error:
source/source.go:71:39: constant 4294967295 overflows int

Because math.MaxUint32 is an untyped integer constant it is converted
to type int when used as an interface param, type int is signed,
MaxUint32 is larger than MaxInt32 and causes the type int to overflow.

Converting ttlMaximum to MaxInt32 stops this overflow.
2019-07-23 17:40:57 +01:00
João Marçal
cb3f8c9ca5 Fixed some formating mistakes
Signed-off-by: João Marçal <joao.marcal12@gmail.com>
2019-07-18 11:27:18 +02:00
João Marçal
9f6ebfa06d Fixed unused assignment
Signed-off-by: João Marçal <joao.marcal12@gmail.com>
2019-07-18 11:05:56 +02:00
João Marçal
6bf1c2bcb5 Added "external-dns/resource=..." field to CRDs usefull to solve conflits
Added warning when CR has a target with a "." in the end, which would make external-dns contantly add and remove the record

Signed-off-by: João Marçal <joao.marcal12@gmail.com>
2019-07-18 10:11:34 +02:00
Jonas Michel
aa551ac704 Add Contour IngressRoute source implementation 2019-07-04 20:06:24 -05: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
twilfong
bafd7b22bb small formatting change to make travis happy 2019-06-27 10:26:53 -07:00
twilfong
d68d06f17c add dualstack support for AWS provider with ALB ingress controllers 2019-06-26 18:05:22 -07:00
Kubernetes Prow Robot
58c9b2e321
Merge pull request #1029 from arturo-c/fix-panic-crd
Fix panic on empty targets for custom resources.
2019-06-08 10:41:06 -07:00
Arturo Contreras
bde9957e48 Rename endPoint to endpoint for crd implementation. 2019-06-04 11:52:36 -06:00
Anton Mironov
6b91201420 Fix indentation 2019-06-04 17:09:48 +03:00
Nick Jüttner
c4dce019dd
Merge branch 'master' into external-services 2019-06-04 15:08:18 +02:00
Kubernetes Prow Robot
ed40405f12
Merge pull request #1023 from yverbin/602-nodeport-trafficpolicy
602 nodeport trafficpolicy
2019-06-04 05:47:13 -07:00
Arturo Contreras
5df90d6900 Add crd check for empty targets. 2019-05-20 09:29:25 -06:00
Anand Patel
edfc413e48
add empty source 2019-05-17 11:40:20 -04:00
Dave Grizzanti
7a6d233bd7 fix route/cloudfoundry test 2019-05-10 12:28:32 -04:00
Dave Grizzanti
002a85e92a Rebase and address PR comments 2019-05-10 12:09:54 -04:00
Dave Grizzanti
ef88346b9b Rebase for go modules 2019-05-10 11:38:54 -04:00
Dave Grizzanti
668a557dea Update for failing tests 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
Anton Mironov
e8c1b030dc Add support for ExternalName services
Related issue: #861
2019-05-09 17:40:19 +03:00
Yaroslav Verbin
0d4d475a4e add test case 2019-04-18 18:08:04 +03:00
Yaroslav Verbin
2b1e1d9eff related to https://github.com/kubernetes-incubator/external-dns/issues/602 2019-04-18 18:07:20 +03:00
Yaroslav Verbin
1798dbdfb5 proper field formatting 2019-04-18 11:23:28 +03:00
Yaroslav Verbin
0d608fd018 create missing DNS entry. fix https://github.com/kubernetes-incubator/external-dns/issues/964 2019-04-16 19:13:26 +03:00
njuettner
76c09dab1f Switch to go modules 2019-04-09 17:22:36 +02:00
Michael Venezia
756c66066d
Bumping istio to 1.1.0, updating fake GatewayConfigStore Get method to work with 1.1.0 2019-03-25 14:05:48 -04:00
Kubernetes Prow Robot
d027662775
Merge pull request #917 from jlamillan/jlamillan/use_informer_cache
Use k8s informer cache instead of making active API GET requests
2019-03-22 10:38:52 -07: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
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
ed71ab6fb6 fix broken test after merge 2019-02-14 15:30:31 -05:00
Anand Patel
60a79b698b merge with master 2019-02-14 15:17:03 -05:00
Nick Jüttner
6d39526069
Merge branch 'master' into cloudflare-proxied-annotation 2019-01-24 11:16:54 +01:00
Kubernetes Prow Robot
92ae0e5042
Merge pull request #645 from toshipp/support-multiple-ips
Support A record for multile IPs for a headless services.
2019-01-23 08:45:23 -08:00
Anand Patel
a023ad7475 merge with master 2019-01-18 10:54:24 -05:00
xunpan
fc245c088d avoid unnecessary updating for CRD resource
with test updated
2018-12-13 02:35:18 -05:00
David Schneider
59f0022b6d Change default apiversion of crd
- Change default apiversion of DNSEndpoint
- Add error to output CRDClient
2018-11-16 18:41:06 +01: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
Erik Swets
e0e7a9defd Allow setting Cloudflare proxying by annotation 2018-11-16 12:52:47 +01:00
vaegt
0af588317b
Remove unnecessary slashes 2018-11-09 11:11:39 +01: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
Pascal
05c7601e7a Continue even if node listing fails 2018-09-19 22:17:15 +02: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
Nick Jüttner
488f10394a
Merge branch 'master' into generic-source 2018-09-03 10:55:12 +02:00
shashidharatd
79ad3a8b1a Add unit tests for crd source 2018-08-22 19:37:21 +05:30
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
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
shashidharatd
e26b73e73f Fix usage of k8s.io/client-go package 2018-07-31 23:02:03 +05:30
Toshikuni Fukaya
44f319e6a0 Support A record for multile IPs for a headless services.
Non statefulset pods associating to a headless service have different
IPs, but have a same hostname. In this case, external-dns registered
only one A record due to attempting to register multiple A records for
a same hostname for each IP.
This patch now registers one A record having multiple IPs.
2018-07-27 19:20:27 +09:00
Rodrigo Menezes
aa8d04f18c Fix for empty target annotation. (#647)
* Fix for empty target annotation.

* add test
2018-07-26 19:33:50 +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
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
Gary Kramlich
2ee4b2e533 Add support for NodePort services (#559)
* First stab at NodePort support. Testing incomplete

* Fix up the unit tests

* Remove some deadcode in the unittests

* gather node ips once and add support for srv records

* Make sure we match gofmt simple

* Move the nodes to the testcase and add a test for clusters that only have internal ip addresses

* Somehow forgot about the weight field in the records

* Add SRV as a supported record type
2018-06-14 18:08:05 +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
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
Dan Bond
0e99625e9a source/service: if clusterIP: None, set TTL (#546)
* source/service: if clusterIP: None, set TTL

* source/service: test headless endpoints with TTL
2018-05-08 14:14:13 +02:00
Gary Kramlich
0e8354795f Merge branch 'master' into issue-239-multiple-targets 2018-04-12 12:11:15 -05: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
Robert Nemeti
8e44381803 for headless services use podip instead of hostip (#498)
* for headless services use podip instead of hostip

* docs: add hostIP to podIP switch to changelog
2018-04-04 13:39:41 +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
Gary Kramlich
1cef71e0be Inititial support for multiple targets per record 2018-03-13 23:16:51 -05: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
Tamal Saha
10b7ceac48 Avoid missing pod hostname for headless service 2018-01-30 19:13:04 -08: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
Martin Linkhorst
0f85859af0
Avoid shadowing package name (#410)
* chore: avoid shadowing package name

* fix: use constant format in call to Sprintf

* chore: try to make go1.9 work on travis
2017-12-01 16:52:51 +01:00
Henning Jacobs
e32f0952b4 #394 fix broken tests caused by conflicting PR merges 2017-11-20 21:44:54 +01:00