Commit graph

1493 commits

Author SHA1 Message Date
DavadDi
12e18a263f add missed kubernetes option to syntax box (#2281) 2018-11-08 07:38:47 -05:00
DavadDi
bad135cdc5 add opts.initPodCache to avoid panic (#2279)
Automatically submitted.
2018-11-07 20:53:05 +00:00
Jiacheng Xu
ae7fbf31d6 Fix a typo in health plugin readme (#2274) 2018-11-06 08:54:53 -08:00
moredhel
b7bbfef6ef fix typo (#2272) 2018-11-05 05:59:24 -08:00
Miek Gieben
756749c5ca
Bump version to 1.2.6 (#2271)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-04 18:06:20 +00:00
Miek Gieben
c2331d7dda plugin/host: parse file without holding lock (#2270)
* plugin/host: parse file without holding lock

Parse first and then swap the maps *while* holding the lock.

Signed-off-by: Miek Gieben <miek@miek.nl>

* add back in the parse function, but now purely for testing

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-03 13:00:07 -07:00
Miek Gieben
921b02e2d5 plugin/log: explain the {size} better (#2269)
This is now the raw size which may be larger than what a particular
client actually sees.

Clarify this a bit.

Fixes #2258

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-03 11:58:15 -07:00
stuart nelson
cac6fe1d07 fix truncation bug (#2261)
* fix truncation bug

* Generate records with generic RRs

* Remove SoundCloud from test name

* Comment for binary-search -1 adjustment

Explain why the binary search may have exited with
a reply size that is too large by one record.

* Refactor to remove sub variable

patch suggested by miek removes unnecessary sub
variable for removing a single line from the
reply.Extra length.
2018-11-03 10:01:56 +00:00
Miek Gieben
1ad002c9f3
dns: bump to 1.0.15 (#2268)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-03 10:01:45 +00:00
Jiacheng Xu
165b4f86a3 plugin/route53: make the upstream address in route53 plugin optional. (#2263)
* Make the upstream in route53 plugin optional.

Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>

* Add 2 tests for upstream in route53.

Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>

* Change the readme.

Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
2018-11-02 21:07:50 +00:00
Jiacheng Xu
1a01e13db8 plugin/etcd: make the address of upstream optional (#2262)
Automatically submitted.
2018-11-02 19:52:12 +00:00
Francois Tur
05204ef142 Metrics registered on wrong prometheus registry (#2246)
* - UT on metrics verifying that all plugins of all blocs have their metrics collectors declared

* - fix error msg

* - redirect Registry of metric to the one that handle the listener
- allow duplicate of metrics collector on the same Registry (case of same plugin in 2 blocs listening metrics on the same address)

* - fix change of signature

* - ensure cleaning metrics before starting the test (metrics collectors are global vars .. and re-used by several tests)

* - I think I fixed this test. Ensure correct mn of hits and clean metrics before test.

* - fix typo in error msg - proposed at review

* - fix typo in comment

* - remove ResetMetrics functions
- change a way to test the numeric metrics : get the diff between begin and end of test

* - oops. removing debug logs
2018-11-01 19:56:00 +00:00
Chris O'Haver
f5aa6cac67 remove trailing whitespace (#2260) 2018-11-01 19:37:13 +00:00
Miek Gieben
2456416444
logging: unify pkg/log and plugin/log (#2245)
Default to using pkg/log for all logging and use a fixed time prefix
which is RFC3339Millli (doesn't exist in time, so we just extended
RFC3339), i.e. Nano might be pushing it.

Logs go from:

2018/10/30 19:14:55 [INFO] CoreDNS-1.2.5
2018/10/30 19:14:55 [INFO] linux/amd64, go1.11,

to:

2018-10-30T19:10:07.547Z [INFO] CoreDNS-1.2.5
2018-10-30T19:10:07.547Z [INFO] linux/amd64, go1.11,

Which includes the timezone - which oddly the std log package doesn't
natively do.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-31 21:32:23 +00:00
Carl-Magnus Björkell
cfbfa5c00e plugin/etcd: propagate recursion flag properly (#2254)
When fetching records via the etcd plugin, the recursion flag was never
set properly according to if the caller requested an exact record match
or not. This cause problems especially in CNAME lookups, where recursion
took place and a random RR was returned instead of the one that was
specifically added for this key. Even when there is no service attached
on the given path, it is still wrong to return a random one from the
recursion.

Fixing by using the `exact` flag to decide if recursion should be done.
2018-10-31 21:08:58 +00:00
Miek Gieben
1ef0a02b46
Revert "log/forward plugins: Extend dns query logging (#2240)" (#2256)
This reverts commit 8045aa279b.
2018-10-31 21:03:46 +00:00
Matthias Lechner
e332c8d8cb Fix error handling when query fails (#2255) 2018-10-31 10:20:43 -07:00
Francois Tur
d42e0d4562 Update README.md (#2253) 2018-10-30 20:23:40 +00:00
Dzmitry Razhanski
8045aa279b log/forward plugins: Extend dns query logging (#2240)
Automatically submitted.
2018-10-29 18:50:31 +00:00
Miek Gieben
e6d02a3fd2 cache: some optimizations (#2247)
Remove some optimization and lowercasing of the qname (in the end
miekg/dns should provide a fast and OK function for it).

* remove the make([]byte, 2) allocation in the key()
* use already lowercased qname in hash key calculation.

% benchcmp old.txt new.txt
benchmark                    old ns/op     new ns/op     delta
BenchmarkCacheResponse-4     9599          8735          -9.00%

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-29 08:13:39 -07:00
Chris O'Haver
29f4205364
plugin/cache: Document actual cache defaults (#2249) 2018-10-29 11:03:59 -04:00
stuart nelson
dc85f14e5c Log error on SO_REUSEPORT and continue (#2243)
The underlying system might not support
SO_REUSEPORT, even though it is available in
kernel 3.9+. If there's an error, continue.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2018-10-28 16:02:58 +00:00
Ruslan Drozhdzh
7b25d18019 plugin/errors: 'consolidate' option (#2192)
- see more details at https://github.com/infobloxopen/coredns-plugin-errors/pull/3
2018-10-27 15:37:09 +01:00
Francois Tur
b0a89452ef Update SECURITY-RELEASE-PROCESS.md (#2237)
Automatically submitted.
2018-10-25 06:39:43 +00:00
Miek Gieben
204537b324
Bump version 1.2.5 (#2235)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-24 20:54:37 +01:00
Paul G
a9ce35ae4e
plugin/rewrite: add closing dot for suffix rewrite rule (#2070)
* add closing dot for suffix rewrite rule
* improve rule syntax checks

Resolves: #1881
2018-10-23 16:59:59 -04:00
Miek Gieben
e8e8187a64
plugin/file: Use new zone parser API (#2219)
* plugin/file: Use new zone parser API

Use new dns lib 1.0.14 and default to using the new zone parser that
does not leak go-routines.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Use new API

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-23 20:19:36 +01:00
Miek Gieben
22bffa7282
Revert "Invite users to fill the survey (#2020)" (#2222)
This reverts commit 073708bc66.
2018-10-23 20:18:49 +01:00
Sandeep Rajan
837042e81e Add more adopters from the survey (#2231)
* add more adopters from the coredns survey
2018-10-23 14:13:03 -04:00
Miek Gieben
898b1ef316 server: actually scrub response (#2225)
* server: actually scrub response

Did all the worked, hooked it up wrongly :(

This also needs test, but those are hard(er) because we only receive
packets after they have been decoded; i.e. we never see the wirefmt.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add tests

Add a test for checking is compression pointers are set in the packet.
This also adds an undocumented 'large' feature to the erratic plugin to
send large responses that should be compressed.

Commenting the Scrub out in server results in:

=== RUN   TestCompressScrub
--- FAIL: TestCompressScrub (0.00s)
    compression_scrub_test.go:41: Expected returned packet to be < 512, got 839
FAIL
exit status 1
FAIL    github.com/coredns/coredns/test 0.036s

Actually checking the size might be easier, but lets be thorough here
and check the pointers them selves.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix tests

Signed-off-by: Miek Gieben <miek@miek.nl>

* plugin erratic: fix e.large

always put an rr in the reply, fix e.large in erractic and add test to
check for it.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-23 09:55:40 -07:00
Chris O'Haver
96529b2c50
make default min ttl 5 (#2227) 2018-10-22 16:59:12 -04:00
Chris O'Haver
85e5ab77d6 add ipv6 loopback example (#2223) 2018-10-22 18:30:42 +01:00
Kevin Nisbet
6539a10a62 Unblock startup if kubernetes API is unavailable (#2126) 2018-10-22 09:30:08 -04:00
Francois Tur
fdb31a27f3 Security release process description (#1861)
* - enhance README to include security release process compatible wiht k8s

* - second version of Security release process, including "Collaborating Projects"

* - reformulate the security release process within a separated doc.

* - add following comment from Sec Team .part 1

* - refactored with comments from Security IB
- refactored considering the same existing document in another CNCF project (envoy)

* - adjust seucrity of README to point the new security process page

* - revert change on FOSSA

* - fix comments from John.

* - removing the todos (I pushed them on the description of the PR)

* - define the PST members in OWNER file

* - fix from review
- add a cahpter for mailing list presentation

* - point the PST members in OWNER file

* - register PST under name 'security' in OWNER file
- early announce will be on coredns-distributors-announce@googlegroup.com
- remove hall of fame reference

* - remove list of security team members from owner file. mailing list of security@coredns.io will be the reference
2018-10-21 18:25:22 +01:00
Manuel Stocker
4b1b0ec9e6 Use filepath when manipulating file paths (#2221)
Automatically submitted.
2018-10-21 13:59:37 +00:00
Manuel Stocker
cf04223718 plugin/dnssec: Add support for KSK/ZSK split key setups (#2196)
* plugin/dnssec: Add support for KSK/ZSK split key setups

* plugin/dnssec: Update README to document split ZSK/KSK operation
2018-10-20 16:35:59 +01:00
Ruslan Drozhdzh
dbc2efc49a plugin/cache: fix TTL for negative DNS responses (#2197) 2018-10-19 14:10:08 -04:00
Yong Tang
54df160aa4
Remove whitespace and pass presubmit (#2217)
While running the following, noticed the whitespace warning from presubmit:
```
ubuntu@ubuntu:~/coredns$ docker run -i -t --rm -v $PWD:/go/src/github.com/coredns/coredns --net=host golang:1.11
root@ubuntu:/go# cd src/github.com/coredns/coredns/
root@ubuntu:/go/src/github.com/coredns/coredns# make
** presubmit/context
** presubmit/filename-hyphen
** presubmit/test-lowercase
** presubmit/trailing-whitespace
plugin/auto/README.md:* `reload` interval to perform reload of zone if SOA version changes. Default is one minute.
plugin/auto/README.md:  Value of `0` means to not scan for changes and reload. eg. `30s` checks zonefile every 30 seconds
plugin/file/README.md:* `reload` interval to perform reload of zone if SOA version changes. Default is one minute.
plugin/file/README.md:  Value of `0` means to not scan for changes and reload. eg. `30s` checks zonefile every 30 seconds
** presubmit/trailing-whitespace: please remove any trailing white space
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-10-19 10:58:36 -07:00
Chris O'Haver
ad43346b58 Update README.md (#2215)
Automatically submitted.
2018-10-18 21:42:53 +00:00
Chris O'Haver
db92d5ecc3 Update README.md (#2213) 2018-10-18 15:19:22 +01:00
Andrey Meshkov
4215ef0279 Add AdGuard to the list of Adopters (#2212) 2018-10-18 09:47:29 +01:00
Miek Gieben
a8c38298f7
docs: run make Makefile.doc (#2210)
No other changes.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-18 09:47:03 +01:00
Miek Gieben
7343c7012f
Release: bump version to 1.2.4 (#2211)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-17 22:53:01 +01:00
Miek Gieben
a044499545
kubernetes: fix the type (#2208)
client-go is a "empty interface" waste-land and we're missing an
integration test so we didn't catch. Try this.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-17 19:35:00 +01:00
Miek Gieben
d9efa96374 Make every one an approver (#2201)
Automatically submitted.
2018-10-16 19:10:00 +00:00
Chris O'Haver
4a5641c379 plugin/cache: Set min TTL default to zero (#2199)
* set min ttl default to zero

* add short TTL test case
2018-10-16 06:24:40 -07:00
Miek Gieben
8cc8afa96a
Bump version to 1.2.3 (#2200)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-16 07:36:40 +01:00
Chris O'Haver
6beeabc47c plugin/federation: Add upstream option to federation (#2177)
* add upstream

* add upstream

* debug ci

* debug ci

* set context

* update readme

* update readme

* remove empty if
2018-10-15 12:43:03 -04:00
Tom Thorogood
1847ef6bd3 plugin/file: Fix memory leak in Parse (#2194)
For zone files with more than 10,000 records, the goroutines and memory
pinned by dns.ParseZone won't be released unless the tokens chan is
drained. As Parse is called by (*Zone).Reload very frequently, this
causes memory leaks and OOM conditions.

Updates miekg/dns#786
2018-10-13 18:56:42 +01:00
Manuel Stocker
3cef6674e9 plugin/dnssec: Add root support (#2195) 2018-10-13 18:49:55 +01:00