Commit Graph

1796 Commits

Author SHA1 Message Date
Yong Tang
9b6e2aa5a6 Update github.com/miekg/dns, github.com/aws/aws-sdk-go, and google.golang.org/grpc (#2960)
This fix updates:
- github.com/miekg/dns to 1.15 (#2947)
- github.com/aws/aws-sdk-go to 1.20.13 (#2953)
- google.golang.org/grpc to 1.22.0 (#2966)

This fix fixes #2947
This fix fixes #2953
This fix fixes #2966

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-07-04 07:44:31 +01:00
Miek Gieben
18304ce9b7 plugin/file: make non-existent file non-fatal (#2955)
* plugin/file: make non-existent file non-fatal

If the zone file being loaded doesn't exist *and* reload is enabled,
just wait the file to pop up in the normal Reload routine.

If reload is set to 0s; we keep this a fatal error on startup. Aslo fix
the ticker in z.Reload(): remove the per second ticks and just use the
reload interval for the ticker.

Brush up the documentation a bit as well.

Fixes: #2951

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

* Stickler and test compile

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

* Remove there too

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

* Cant README test these because zone files dont exist

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-04 13:56:37 +08:00
Anshul Sharma
f9fb9db171 ISSUE-2911 (#2923)
- Remove resyncperiod from Kubernetes plugin
2019-07-03 20:39:12 +01:00
Anshul Sharma
2bd77d0823 Fix multiple credentials in route53 (#2859) 2019-07-03 20:14:31 +01:00
Miek Gieben
f5fe98395e Remove -cpu flag (#2793)
The -cpu flag is a weird one (and copied originally from Caddy), it
basically sets GOMAXPROCS which can be *easily* done by just setting
that environment variable. Also with systemd and containerized env you
set this externally *anyway*, so there is little use to do this again in
the binary.

Also the option's help was confusing (i.e. percentage of what?). Remove
the option and supporting files.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-03 20:12:51 +01:00
Miek Gieben
e0c373ec12 notes 1.5.2: fix typo (#2971)
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-03 20:09:56 +01:00
Miek Gieben
d933f635af Bump version to 1.5.2 (#2969)
Run through the motions; create manual pages. Run go generate for good
measure. Fix typo in Makefile.release while at it.

Signed-off-by: Miek Gieben <miek@miek.nl>
v1.5.2
2019-07-03 19:47:38 +01:00
Miek Gieben
bb9df3122d Update notes and make the manual pages (#2970)
* Update notes and make the manual pages

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

* better

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-03 19:38:19 +01:00
John Belamaric
7cf73cc01d plugin/template: support metadata (#2958)
* Enable use of metadata in templates

* Update README

* Don't stash away ctx, instead use a new func
2019-07-03 16:10:56 +01:00
Miek Gieben
2faad5b397 Release: 1.5.2, add release notes (#2965)
Prompted by the caddy import path changes; prepare a new release.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-03 15:32:24 +08:00
Miek Gieben
3e5fd21e68 file: close correctlty after AXFR (#2943)
* file: close correctlty after AXFR

Don't hijack, but wait for the writes to be done and then savely close
the connection.

Fixes: #2929

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

* Update comment

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

* file: close correctlty after AXFR (#2943)

apply

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-03 07:01:57 +01:00
Yong Tang
f8bba51f84 Update Caddy to 1.0.1, and update import path (#2961)
* Update Caddy to 1.0.1, and update import path

This fix updates caddy to 1.0.1 and also
updates the import path to github.com/caddyserver/caddy

This fix fixes 2959

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

* Also update plugin.cfg

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

* Update and bump zplugin.go

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-07-03 09:04:47 +08:00
Miek Gieben
22c6e3e179 plugins: set upstream unconditionally (#2956)
`upstream` is not needed as a setting; just set if unconditionally and
remove all documentation and tests for it.

At some point we want remove the hanlding for `upstream` as well and
error out on seeing it.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-07-02 16:23:47 +01:00
Miek Gieben
3a0c7c6153 plugin/file: load secondary zones lazily on startup (#2944)
This fixes a long standing bug:
fixes: #1609

Load secondary zones in a go-routine; this required another mutex to
protect some fields; I think those were needded anyway because a
transfer can also happen when we're running; we just didn't have a test
for that situation.

The test had to be changed to wait for the transfer to happen at this is
async now.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-30 05:22:34 +08:00
JINMEI Tatuya
2c1f5009be added a test for transferring a large zone in file plugin (#2905)
* added a test for transferring a large zone in file plugin

* avoid hardcoding number of RRs multiple times

* don't do testing.Parallel as suggested.

* applied gofmt -s
2019-06-29 08:58:07 +01:00
bcebere
6e7a5f5677 TLS hardening (#2938)
Automatically submitted.
2019-06-28 11:03:34 +00:00
Timoses
41661b0848 Provide example to utilize k8s_external plugin (#2936)
* Provide example to utilize k8s_external plugin

The example provides a specific use case of k8s_external and may help others to grasp `k8s_external`'s capabilities.

* Update plugin/k8s_external/README.md

Co-Authored-By: Chris O'Haver <cohaver@infoblox.com>

* Update plugin/k8s_external/README.md

Co-Authored-By: Chris O'Haver <cohaver@infoblox.com>
2019-06-27 20:02:08 +01:00
Miek Gieben
c9e3613613 Notes for 1.5.1. (#2928)
Fighting with hugo - dates can't be quoted.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-26 14:08:35 +01:00
Miek Gieben
6c33397d29 Tag 1.5.1 (#2927)
Signed-off-by: Miek Gieben <miek@miek.nl>
v1.5.1
2019-06-26 12:46:34 +01:00
Miek Gieben
d4d019d749 docs: Makefile.release and Makefile.doc (#2926)
* add metrics for reload
* documented release process better
* run: Makefile.doc all to push reload doc to man-pages

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-26 11:18:03 +01:00
Anshul Sharma
ad352cee88 plugin/reload: Add metrics (#2922)
* Issue 2920
- Add failed reload counter metrics

* typo fix

* Requested Changes
2019-06-26 07:38:46 +01:00
Miek Gieben
cd176f859b Run gofmt -s and golint on the codebase (#2918)
* Run gofmt -s and golint on the codebase

Run golint and fix everythign it flagged (except the context arg
ordering), mostly edits in the rewrite plugin.

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

* ... and ofcourse the test as well

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-25 15:00:33 +08:00
Yong Tang
123628dc46 Update zipkin, etcd, klog and aws (#2913)
* Update zipkin, etcd, klog and aws

This fix updates:
- github.com/openzipkin/zipkin-go-opentracing
- k8s.io/klog
- github.com/coreos/etcd
- github.com/aws/aws-sdk-go

This fix fixes #2906
This fix fixes #2907
This fix fixes #2908
This fix fixes #2909

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

* Also updates opentracing

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-06-25 07:49:51 +01:00
Miek Gieben
242ed71845 Add 1.5.1 release notes (#2912)
* Add 1.5.1 release notes

Prepare for imminent release.
Also list PRs merged in a new section to provide more detail.

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

* Updates after review

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-25 07:42:59 +01:00
Miek Gieben
51cf388da2 doc: make -f Makefile.doc (#2919)
mechanical change: create the manual pages.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-24 19:37:27 +08:00
Yong Tang
e54b784a7e Update multiple dependencies (#2904)
This fix updates:
- github.com/miekg/dns from 1.1.12 to 1.1.14
- google.golang.org/grpc from 1.21.0 to 1.21.1
- github.com/aws/aws-sdk-go from 1.19.41 to 1.20.3
- github.com/prometheus/common from 0.4.1 to 0.6.0
- gopkg.in/DataDog/dd-trace-go.v1 from 1.14.0 to 1.15.0

This fix fixes #2899
This fix fixes #2900
This fix fixes #2901
This fix fixes #2902
This fix fixes #2903

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-06-20 10:46:16 +01:00
Chris O'Haver
b94c85a0db Update README.md (#2896) 2019-06-17 20:46:02 +01:00
Chris O'Haver
1cb44f0bfd Update plugin.go (#2894) 2019-06-17 20:01:06 +01:00
Miek Gieben
8848792e40 plugin/file: document using an explicit origin (#2893)
* plugin/file: document using an explicit origin

See #2880

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

* Code review comments

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-17 19:47:07 +01:00
Sandeep Rajan
ade5ea2361 Add CircleCI for Integration testing (#2889)
* add circleci

* make ci work

* use existing script for setup

* add sep step for getting CI repo
2019-06-17 19:26:42 +01:00
An Xiao
c432f894b2 Rename bind_test.go to setup_test.go (#2891)
Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-06-17 13:20:33 +01:00
An Xiao
c1d7c2e69b Raise error if regexp and template are not specified together (#2884)
Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-06-13 12:07:41 +01:00
Miek Gieben
481dea50ad plugin/cache: remove item.Autoritative (#2885)
* plugin/cache: remove item.Autoritative

Confuses clients if not set; remove it.

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

* Add extra comments on why we do this

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-13 10:36:47 +01:00
An Xiao
27ca097df4 Fix a typo in the document of plugin file (#2882) 2019-06-11 16:11:42 -04:00
Yong Tang
f13482f4d1 Follow up on PR 2868 (#2877)
This fix is a follow up on comment https://github.com/coredns/coredns/pull/2868#discussion_r291609761

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-06-10 10:02:02 +01:00
Yong Tang
60f483e98b Fix lowercase presummit (#2876)
While running make encountered the following error:
```
$ docker run -i -t --rm -v $PWD:/v --net=host -w /v golang:1.12 make
...
...
** presubmit/test-lowercase
plugin/kubernetes/metadata_test.go:			t.Errorf("case %d expected metadata %v and got %v", i, tc.Md, md)
** presubmit/test-lowercase: please start with an upper case letter when using t.Error*()
Makefile:62: recipe for target 'presubmit' failed
make: *** [presubmit] Error 1
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-06-10 07:35:07 +01:00
Anshul Sharma
74303a985c Fix Datadog tracer (#2868)
- Fixes #2862
2019-06-09 13:44:19 -07:00
John Belamaric
ffcd2f61cf Publish metadata from kubernetes plugin (#2829)
* Publish metadata from kubernetes plugin

* stickler fix

* Add a couple tests

* Add metadata section to README

* Update plugin/kubernetes/README.md

Co-Authored-By: Chris O'Haver <cohaver@infoblox.com>

* Address nit
2019-06-09 08:10:57 +01:00
Miek Gieben
a1c97f82a6 plugin/ready: fix starts and restarts (#2814)
Add OnRestartFailed to the ready plugin and some various cleanups.

Document slightly better how things are supposed to work with multiple
`ready`'s in the multiple Server Blocks.

All manually tested with this Corefile:
~~~
. {
    log
    ready
}

example.org {
    log
    chaos
    ready
}
~~~
And then `kill -SIGUSR1` and curling the ready endpoint. This works
well, the FailedReload is triggered by adding a syntax error in the
Corefile.

See #2659

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-09 08:10:15 +01:00
Chris O'Haver
bd83f74deb remove unused functions (#2873) 2019-06-09 08:09:55 +01:00
Miek Gieben
458e778113 Revert "be sure to close connection after completion of xfr out. (#2866)" (#2872)
This reverts commit a657e1f661.
2019-06-07 15:29:42 +01:00
JINMEI Tatuya
a657e1f661 be sure to close connection after completion of xfr out. (#2866)
otherwise the connection and associated socket stay in the CLOSE_WAIT
state unless/until golang runtime performs GC.
2019-06-05 07:21:59 +01:00
Francois Tur
d3e2ef73b8 stepdown from CoreDNS maintainer (#2861) 2019-06-03 16:21:05 -04:00
Yong Tang
6980345edc Update several dependencies in go mod (#2860)
This fix updates several direct dependencies (grpc, aws, protobuf) in go mod,
and removed duplicates with `go mod tidy`

Note: tracing related dependencies are not touched, as
DataDog/tracing dependencies still give trouble.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-06-03 14:47:10 +01:00
Chris O'Haver
e1d0b63e3f allow an empty response (#2855) 2019-06-01 08:40:12 +01:00
Miek Gieben
3b3fb6f583 plugin/kubernetes: skip deleting pods (#2853)
Don't add pods to our internal cache that are being deleted. This saves
a field in the struct as well.

Add (extra) comments about adding fields to the
object/{Pod,Service,Endpoint} structs.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-06-01 08:39:52 +01:00
Cricket Liu
adc021d6ff Update README.md (#2856)
General syntactic cleanup.
2019-05-31 15:42:47 -07:00
JINMEI Tatuya
a6d9adbf4a make sure client CA and auth type are set if CA is explicitly specified. (#2825)
* make sure client CA and auth type are set if CA is explicitly specified.

added some simple tests to confirm the effect.

* test certificates (forgot to add them in the previous commit)

* made client auth policy configurable with new client_auth option.

README has been updated accordingly.

* fix editorial in README
2019-05-31 09:30:15 -07:00
Chris O'Haver
5565ca1c03 kubernetes: bump to client-go 11.0.0 (#2854)
* client-go 11.0.0

* Core moved to CoreV1
2019-05-31 08:01:48 -07:00
Andras Spitzer
7dde3f3958 Fix for #2842, instead of returning the first Pod, return the one whi… (#2846)
* Fix for #2842, instead of returning the first Pod, return the one which is Running

* a more memory efficient version of the fix, string -> bool

* fix with no extra fields in struct, return nil at Pod conversion if Pod is not Running

* let Kuberneretes filter for Running Pods using FieldSelector

* filter for Pods that are Running and Pending (implicit)
2019-05-29 08:06:45 +01:00