Commit graph

1749 commits

Author SHA1 Message Date
Brian Bao
c2133ce6b1 Update README.md on compiling from GitHub (#2543) 2019-02-09 14:40:54 +00:00
mrasu
6793223948 Fix etcd_cache_test to runnable multiple times. (#2546)
Currently, when you run `TestEtcdCredentials` at etcd_credentials_test.go multiple times without clearing data of etcd, you will get following errors.

```
etcd_credentials_test.go:38: Failed to create root role: etcdserver: role name already exists
etcd_credentials_test.go:41: Failed to create user: etcdserver: user name already exists
```
2019-02-09 14:39:51 +00:00
Miek Gieben
ab4262d7eb
Add CONTRIBUTING symlink (#2540)
symlink from within .github

This should be enough to show it in pull request; unless github has
something against symlinks.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-08 17:07:50 +00:00
Chris O'Haver
8b3e4e0687 Ask if the PR introduces backward incompatibility (#2538) 2019-02-08 16:30:17 +00:00
Miek Gieben
073e2e1cf5
doc: update CONTRIBUTING.md (#2530)
* doc: update CONTRIBUTING.md

Remove bunch of old/stale text, but add a section (and clarify) using
issues to describe a future PR and that those need to be small (if you
want it merged faster)

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

* Update CONTRIBUTING.md

Co-Authored-By: miekg <miek@miek.nl>
2019-02-08 16:21:18 +00:00
JoeWrightss
06d945fc32 Fix some spelling errors in comment (#2533)
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-02-07 11:27:27 -05:00
Guy Templeton
39cf482348 Set klog's logtostderr flag (#2529)
* Parse as well as  setlogtostderr flag

* Enforce setting of logtostderr for klog

* Clearup comment on klog
2019-02-07 07:33:30 +00:00
Kenjiro Nakayama
92836cc6f9 Fix broken link (#2522)
This patch fixes broken link in README.md
2019-02-03 12:46:19 +00:00
Miek Gieben
f59b414a7e Update to dns/1.1.4 (#2521)
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-02 05:08:40 +08:00
Christophe de Carvalho
d878eeebbb support etcd credentials in etcd plugin (#2442)
* support etcd credentials in etcd plugin

fixes #2441

* try to fix cleanup of authentication
2019-02-01 15:30:53 +00:00
JoeWrightss
b455f86824 Fix some typos in comment (#2520)
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-02-01 19:22:43 +08:00
ckcd
2b651129fb plugin/log: add test and benchmark (#2515) 2019-01-30 11:12:26 +00:00
Chris O'Haver
68e09f00a4 skip pushing watch updates when there are no watches (#2513) 2019-01-29 11:15:49 -08:00
Ye Ben
0eff7f3797 some typo fix (#2512)
Signed-off-by: yeya24 <ben.ye@daocloud.io>
2019-01-29 10:21:19 -05:00
Carl-Magnus Björkell
a84c26d78b plugin/etcd: Filter empty host field by qtype (#2499)
When a query, different from a TXT lookup is performed, all services
with a missing `Host` field should be filtered out, as these otherwize
cause a line in the answer section with a single dot (`.`) as the
result. This behavior manifests for example when a TXT record is present
on a domain, eg. an A or SRV lookup is performed on said domain.

If there are no services containing a `Host` field, a `NODATA` response
should be given. If there are other Services, these alone should be
returned for the query.

Filter any service that has an empty Host field from all lookup types
other than TXT to solve this issue. At the same time the check for empty
`Text` fields in TXT queries are also moved to the same check in the
etcd ServiceBackend.
2019-01-28 16:38:27 +00:00
Thomas Mangin
e343556687 plugin/hosts: fix for ipv4-in-ipv6 (#2506)
* fix for ipv4-in-ipv6

* update comment as requested
2019-01-28 16:36:34 +00:00
Guy Templeton
d571fbe046 Correct formatting of policies list (#2509) 2019-01-28 10:07:13 -05:00
Xuanwo
ffe79b026e Remove duplicated TempFile testsuit (#2508) 2019-01-28 07:25:14 +00:00
Miek Gieben
f300fa9bb2
readme: add text on backward incompat changes (#2470)
* readme: add text on backward incompat changes

Document the process of releasing backwards incompatible changes.

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

* slightly better

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

* Add an example

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

* Be more explicit in naming the segments increased

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-27 18:02:25 +00:00
Yong Tang
4a9631cec3 golint fix (#2504)
This PR is a small golint fix:
```
coredns/plugin/test/helpers.go
Line 283: warning: redundant if ...; err != nil check, just return error instead. (golint)
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-27 17:55:07 +00:00
mrasu
eb85af2240 plugin/etcd: Fix REAME's ttl (#2502)
There are string ttls at commands at README.md.
But because `TTL` of `Service` is uint32, commands at README is wrong.

e.g.) `etcdctl put /skydns/local/skydns/x1 '{"host":"1.1.1.1","ttl":"60"}'`.
2019-01-27 17:54:50 +00:00
Carl-Magnus Björkell
48a8d6c75e plugin/etcd: Remove unnecessary struct copy (#2497)
The `b` struct is just copying all the fields into a new one, to
check if it already existed in a set. This isn't needed as all the
fields are identical, and a small rearrangement of the code solves the
same problem without the copy.
2019-01-27 17:54:28 +00:00
Dan Kohn
74c8bf25dc s/incubating/graduated/ (#2500) 2019-01-25 13:17:54 +00:00
AdamDang
1b539b1fff Update plugin.md (#2496)
Fix a small error
2019-01-24 20:08:27 -08:00
Chris O'Haver
92bec854dc
Update README.md (#2490) 2019-01-23 08:49:16 -05:00
Thomas Mangin
3533065ed2 plugin/hosts reload the hosts file every 5 seconds (#2478)
* inform users of the reload feature

* modified as requested
2019-01-21 07:54:41 +00:00
Yong Tang
ef8cb40688 Add presubmit to check if there are any files that have import "testing" (#2480)
The check is done through
```
if [[ $(go list -f '{{ join .Deps " "}}') == *" testing "* ]]; then
   error..
fi
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-21 07:36:46 +00:00
Miek Gieben
725becd134
Stop importing testing in the main binary (#2479)
* Stop importing testing in the main binary

Stop importing "testing" into the main binary:

* test/helpers.go imported it; remote that and change function signature
* update all tests that use this

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

* Drop import testing from metrics plugin

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

* more fiddling

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-19 11:23:13 +00:00
Chris O'Haver
278303ca0d set ttl for ns records (#2452) 2019-01-19 10:25:52 +00:00
Rob Maas
b0d37c5443 fix tls_servername in cloudflare example (#2466) 2019-01-15 09:18:20 -08:00
Chris Aniszczyk
ea5ee43d58 Reference security audit in README (#2468)
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2019-01-15 09:16:18 -08:00
Yong Tang
7bd6855155
Deprecate multiple endpoints for out-of-cluster k8s api (#2454)
This fix deprecates endpoints for out-of-cluster k8s api,
The Corefile still takes multiple endpoints though only
the first one is used. A warning is shown if there are
multiple endpoints.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-13 10:09:51 -08:00
Miek Gieben
f655d404d4
Fix setup_test in plugin/kubernetes (#2460)
PR race condition, fix the test data for the setup.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-13 17:16:36 +00:00
Miek Gieben
9c16ed1d14
Default to upstream to self (#2436)
* Default to upstream to self

This is a backwards incompatible change.

This is a massive (cleanup) PR where we default to resolving external
names by the coredns process itself, instead of directly forwarding them
to some upstream.

This ignores any arguments `upstream` may have had and makes it depend
on proxy/forward configuration in the Corefile. This allows resolved
upstream names to be cached and we have better healthchecking of the
upstreams. It also means there is only one way to resolve names, by
either using the proxy or forward plugin.

The proxy/forward lookup.go functions have been removed. This also
lessen the dependency on proxy, meaning deprecating proxy will become
easier. Some tests have been removed as well, or moved to the top-level
test directory as they now require a full coredns process instead of
just the plugin.

For the etcd plugin, the entire StubZone resolving is *dropped*! This
was a hacky (but working) solution to say the least. If someone cares
deeply it can be brought back (maybe)?

The pkg/upstream is now very small and almost does nothing. Also the
New() function was changed to return a pointer to upstream.Upstream. It
also returns only one parameter, so any stragglers using it will
encounter a compile error.

All documentation has been adapted. This affected the following plugins:
* etcd
* file
* auto
* secondary
* federation
* template
* route53

A followup PR will make any upstream directives with arguments an error,
right now they are ignored.

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

* Fix etcd build - probably still fails unit test

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

* Slightly smarter lookup check in upstream

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

* Compilez

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-13 16:54:49 +00:00
Miek Gieben
6b56a9c921
Tag version 1.3.1 (#2458)
Tag the 1.3.1 version.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-13 14:18:46 +00:00
Yong Tang
5274c4454d
Remove version pinning of thrift, ugoriji/go, and etcd (#2457)
* Remove version pinning of thrift, ugoriji/go, and etcd

For incompatibility reasons at one point, we were forced
to pining the version of thrift, ugoriji/go, and etcd
to very specific versions (some are not versioned commits)
to get around the build issues.

It looks like those incompatibility issues are gone so
we could remove the pinning of thrift, ugoriji/go, and etcd.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update Gopkg.lock

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update vendor library

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-12 12:02:19 -08:00
Miek Gieben
003355e18e new dns version (#2456)
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-12 04:17:13 -08:00
Chris O'Haver
22cacc7cb1 fix soa min ttl in tests cases (#2451) 2019-01-10 15:49:53 +00:00
Chris O'Haver
875c11a0cb set minttl to ttl setting (#2446) 2019-01-10 07:34:22 +00:00
Miek Gieben
0efa99e954
docs: update the compile-from-source section (#2449)
You can't go get coredns - update this section.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-09 09:28:08 +00:00
Chris O'Haver
18f25dbef3
plugin/kubernetes: fix case preservation and add test (#2430)
* fix case preservation and add test
* only fix case in k8s
2019-01-08 08:30:03 -05:00
ckcd
418edd2a2f plugin/log: support multi nameScope (#2420) 2019-01-08 07:40:50 +00:00
Yong Tang
53d1afbaf2
Error out when multiple https endpoints are specified. (#2438)
This fix will error out when multiple https endpoints are specified,
as additional work is needed to support beyond http.

This fix fixes 1464.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-07 09:28:03 -08:00
Miek Gieben
06efc07f46
Generate man-pages (#2439)
Almost 100% mechanical change, except the fact that import/import.md
is moved to import/README.md

No content changes.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-06 09:15:34 +00:00
Miek Gieben
fb32f7a358 Add import plugin to give it docs (#2428)
* wip: add import to make it have docs

Fake the import plugin further to give it proper docs. This should help
make it more discoverable.

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

* Finish writing the documentation

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-05 19:41:47 -08:00
Miek Gieben
652b9a69d8
plugin/kubernetes: add memory usage guidelines (#2424)
Add words in object.go on the memory use and put some future ideas in
there to use even less (if we have to at some point).

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-05 16:58:27 +00:00
Miek Gieben
35b74eb197
plugin/log: update nodata/NXDOMAIN story a bit (#2416)
* plugin/log: update nodata/NXDOMAIN story a bit

Add more words on nodata and NXDOMAIN which is a confusing DNS
"feature"

Fixes: #2412

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

* typos

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-05 16:33:27 +00:00
jmpcyc
c56603ea79 update zplugin.go path && add .PHONY for all target (#2433)
* update zplugin.go path && add .PHONY for all target

* update zplugin.go path && add .PHONY for all target

* update zplugin.go target
2019-01-04 20:09:26 +00:00
Miek Gieben
4f9fade38e new miekg/dns (#2435)
New release, kick of tests.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-04 12:00:50 -08:00
Miek Gieben
300506ee91
plugin/log: detail {combined} and {common} (#2422)
These can be used (and are handy), document them.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-04 19:39:02 +00:00