Commit graph

19 commits

Author SHA1 Message Date
Guy Templeton
d571fbe046 Correct formatting of policies list (#2509) 2019-01-28 10:07:13 -05:00
Karsten Weiss
6d8a078704 Typo fixes (#2031) 2018-08-14 08:55:55 -07:00
Miek Gieben
2758a756dd
Implement deprecation notice for 1.1.4 (#1833)
* Implement deprecation notice for 1.1.4

This still allows all the config to be parsed, but noops it:

* -log; always set the log to stdout; no matter what.
* https_google; removed from the proxy implementation.
* reverse plugin: set to deprecated.

* Whole of reverse can go

* Remove test for deprecated plugin
2018-05-24 14:30:01 +01:00
Chris O'Haver
afed91646a
plugin/proxy: fix except example (#1796)
I just noticed this discrepancy in one of the `except` examples.
2018-05-11 13:51:21 -04:00
Miek Gieben
61726b3721
Run make -f Makefile.doc (#1705)
Remove trailing white space from proxy/README.md
2018-04-20 07:24:19 +01:00
Scott Donovan
19a1ef48f2 adding sequential policy to forward plugin (#1704)
* adding sequential policy to forward plugin

* making sequential an alias to first in proxy plugin
2018-04-20 07:07:58 +01:00
Miek Gieben
08443a9f00
plugin/metrics: add 'server' label (#1682)
* plugin/metrics: add 'server' label

This uses the new WithServer(ctx) to get the current server from the
context.

First in a larger refactor to make all plugins do this.

* compile

* compile

* lala test

* compile and test

* typos

* Dont duplicate the code
2018-04-18 09:42:20 +01:00
Francois Tur
5a546f743e Plugin/Proxy - update README (#1658)
* - adding policy first in the policies description

* - fix number of policies available
2018-04-06 15:53:08 +01:00
Freddy
86be6d2532 remove coredns-grpc reference and update DnsService link (#1542) 2018-02-19 15:29:20 +00:00
Francois Tur
b93a36b213 Plugin/Proxy - add new policy always_first to mimic windows dns resolvers (#1459)
* add new policy always_first to mimic windows dns resolvers
fill documentation, add UT and cleanup fmt

* change name of policy from always_first to first. Update docs
2018-01-30 16:29:49 -05:00
Miek Gieben
b7476d0217
Doc (#1369)
* Constent atx headers

* Regen manual pages
2018-01-10 11:45:12 +00:00
Miek Gieben
58221f55db
Manual pages (#1346)
* Add manual pages

Generate manual pages from the README and extend README with Name and
Description sections.

The generation requires 'ronn' which may not be available. Just check in
all generated manual pages.
2018-01-04 12:53:07 +00:00
Miek Gieben
0d103ff57c
plugin/proxy: add note about HC and google_https (#1269)
HC for google_https does not work because it does not HC the correct
set of IPs. Hard to solve in the current code - rather use forward as
the new impl. and leave this as legacy.

Remove superfluous println that we are refreshing the dns.google.com IP
address.
2017-12-01 13:21:18 +00:00
Miek Gieben
917965fa86
metrics: use exponentional buckets (#1261)
* metrics: use exponentional buckets

See  https://github.com/kubernetes/dns/pull/168
2017-12-01 11:15:05 +00:00
Miek Gieben
e34e2c251f plugin/proxy: kick of HC on every 3rd failure (#1110)
* healthchecks: check on every 3rd failure

Check on every third failure and some cleanups to make this possible. A
failed healthcheck will never increase Fails, a successfull healthceck
will reset Fails to 0. This is a chance this counter now drops below 0,
making the upstream super? healthy.

This removes the okUntil smartness and condences everything back to 1
metrics: Fails; so it's simpler in that regard.

Timout errors are *not* attributed to the local upstream, and don't get
counted into the Fails anymore. Meaning the 'dig any isc.org' won't kill
your upstream.

Added extra test the see if the Fails counter gets reset after 3 failed
connection.

There is still a disconnect beween HTTP healthceck working the proxy (or
lookup) not being able to connect to the upstream.

* Fix tests
2017-10-15 19:38:39 +02:00
Miek Gieben
7c6ba3fcbd plugin/proxy: fix metrics (#1137)
Add Counter metrics and fix duration to use upstream name (and only use
it when we have one).

Fix the documentation to reflect this.

Fixes #1134
2017-10-08 04:30:44 -07:00
Miek Gieben
2a32cd4159 plugin/proxy: decrease health timeouts (#1107)
Turn down the timeouts and numbers a bit:
FailTimeout 10s -> 5s
Future 60s -> 12s
TryDuration 60s -> 16s
The timeout for decrementing the fails in a host: 10s -> 2s

And the biggest change: don't set fails when the error is Timeout(),
meaning we loop for a bit and may try the same server again, but we
don't mark our upstream as bad, see comments in proxy.go. Testing this
with "ANY isc.org" and "MX miek.nl" we see:

~~~
::1 - [24/Sep/2017:08:06:17 +0100] "ANY IN isc.org. udp 37 false 4096" SERVFAIL qr,rd 37 10.001621221s
24/Sep/2017:08:06:17 +0100 [ERROR 0 isc.org. ANY] unreachable backend: read udp 192.168.1.148:37420->8.8.8.8:53: i/o timeout

::1 - [24/Sep/2017:08:06:17 +0100] "MX IN miek.nl. udp 37 false 4096" NOERROR qr,rd,ra,ad 170 35.957284ms

127.0.0.1 - [24/Sep/2017:08:06:18 +0100] "ANY IN isc.org. udp 37 false 4096" SERVFAIL qr,rd 37 10.002051726s
24/Sep/2017:08:06:18 +0100 [ERROR 0 isc.org. ANY] unreachable backend: read udp 192.168.1.148:54901->8.8.8.8:53: i/o timeout

::1 - [24/Sep/2017:08:06:19 +0100] "MX IN miek.nl. udp 37 false 4096" NOERROR qr,rd,ra,ad 170 56.848416ms
127.0.0.1 - [24/Sep/2017:08:06:21 +0100] "MX IN miek.nl. udp 37 false 4096" NOERROR qr,rd,ra,ad 170 48.118349ms
::1 - [24/Sep/2017:08:06:21 +0100] "MX IN miek.nl. udp 37 false 4096" NOERROR qr,rd,ra,ad 170 1.055172915s
~~~

So the ANY isc.org queries show up twice, because we retry internally -
this is I think WAI.

The `miek.nl MX` queries are just processed normally as no backend is
marked as unreachable.

May fix #1035 #486
2017-09-24 20:05:36 +01:00
Miek Gieben
19d7d207d3 Make proxy examples better (#1080) 2017-09-15 11:30:10 +01:00
Miek Gieben
d8714e64e4 Remove the word middleware (#1067)
* Rename middleware to plugin

first pass; mostly used 'sed', few spots where I manually changed
text.

This still builds a coredns binary.

* fmt error

* Rename AddMiddleware to AddPlugin

* Readd AddMiddleware to remain backwards compat
2017-09-14 09:36:06 +01:00
Renamed from middleware/proxy/README.md (Browse further)