aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-02-09Stop noisy modifications (#1517)Gravatar John Belamaric 2-3/+152
* Stop noisy modifications * Review comments, tests * More coverage * vet * Make it obvious new port name is not a typo
2018-02-09kubernetes: Fix Federation example in README (#1515)Gravatar Chris O'Haver 1-2/+0
Remove `fallthrough` from the federation example in the README. `fallthrough` isn't needed here and has no effect (federation has an implicit fallthrough for non-federated queries). It's inclusion is confusing.
2018-02-08support for zone transfer for kubernetes (#1259)Gravatar Brad Beam 10-18/+370
* plugin/kubernetes: axfr Hook up dynamic SOA serial by setting ResourceEventHandlerFuncs in dnsController. Add prototype of returns msg.Services via the Transfer function. Leave expanding this to RRs out of scope for a bit. * plugin/kubernetes: axfr Respond to AXFR queries * Fixing race condition * Fixing instantiation of dnstest writer * Updates from review
2018-02-08Add OWNERS file (#1486)Gravatar Miek Gieben 1-0/+16
This should have everyone, but the process was quite manual. The rename from middleware -> plugin also meant I had to do some extra digging on who actually submitted the PR. I also double checked the current list of people with commit access. Every plugin now has an OWNERS, except *reverse*. I'll file a bug for that.
2018-02-07plugin/kubernetes: Allow only one k8s section (#1497)Gravatar Chris O'Haver 2-1/+18
* allow only one k8s section * add test
2018-01-29spelling (#1461)Gravatar Chris O'Haver 1-1/+1
2018-01-28pl/kubernetes: drop the comma parsing (#1453)Gravatar Miek Gieben 3-7/+5
Let caddyfile parser give us the token, the comma sep thing also didn't work. Fixes #1446
2018-01-24Remove pointers to labels.Selector and pass normally instead (#1422)Gravatar Ilya Galimyanov 2-15/+15
2018-01-23fix computation of reverse zone based on Ipv6 CIDRs (#1415)Gravatar Francois Tur 2-1/+26
2018-01-09pkg/fall: make Zero and Root vars not funcs (#1367)Gravatar Miek Gieben 1-24/+24
These can be just vars. Think that was intended as well.
2018-01-07Simplify plugin/pkg/fall (#1358)Gravatar John Belamaric 3-47/+32
* Simplify plugin/pkg/fall * Remove unused import * Fix fall_test * Get fall coverage to 100% just because * gofmt. sigh.
2018-01-07Add pkg/fall for Fallthrough (#1355)Gravatar Miek Gieben 4-6/+8
* Add pkg/fall for Fallthrough Move this into it's own package to facilitate tests. Important bug was fixed: make the names fully qualified. Add fall package to hosts, reverse, etcd, and fix kubernetes and any tests. The k8s tests are still as-is, might need a future cleanup.
2018-01-06kubernetes: Add zone filtering to fallthrough (#1353)Gravatar John Belamaric 5-44/+57
* Add zone filtering to fallthrough * Doh. gofmt * Update documentation
2018-01-06plugin/kubernetes: fix pod insecure mode (#1354)Gravatar Miek Gieben 2-0/+34
Fixes #1331
2018-01-05plugin/kubernetes: add explicit non-existing ns check (#1350)Gravatar Miek Gieben 1-0/+8
We already do the right thing here, but add a test none-the-less.
2018-01-05plugin/kubernetes: partial fix for crazy pod queries (#1349)Gravatar Miek Gieben 2-9/+20
This is probably the first in a series to fix "crazy" pod queries. If the namespace doesn't exist return NXDOMAIN. It might be worth extending this 1:1 to findServices as well.
2018-01-04Manual pages (#1346)Gravatar Miek Gieben 1-12/+13
* 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-03Update k8s client-go to v6.0.0 (#1340)Gravatar Yong Tang 8-16/+16
* Update k8s client-go to v6.0.0 This fix updates k8s client-go to v6.0.0 as CoreDNS is supported in 1.9 and v6.0.0 is the recommended version. There are quite some massive changes that need to be made: 1. k8s.io/client-go/pkg/api/v1 has been changed to k8s.io/api/v1 (repo changed from `client-go` to `api`) 2. kubernetes.Clientset adds one extra layer, so that `kubernetes.Clientset.Services()` and like has been changed to `kubernetes.Clientset.CoreV1().Services()` Also, we have to stick with specific commits of `k8s.io/apimachinery` and the newly introduced `k8s.io/api` because go dep still could not figure out the right version to fetch. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update vendor with `dep ensure --update` and `dep prune` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-12-15Fix a couple of typos (#1316)Gravatar Yong Tang 1-1/+1
`hanlder` -> `handler` `bounderies` -> `boundaries` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-12-14Adding additional records for test cases (#1304)Gravatar Brad Beam 1-0/+33
2017-12-07Changing switch to compare on constants versus strings (#1285)Gravatar Brad Beam 1-10/+10
2017-12-07Consolidating const declarations (#1287)Gravatar Brad Beam 1-9/+6
2017-11-22fix external service type check (#1246)Gravatar Chris O'Haver 3-3/+5
2017-11-16plugin/k8s: ipv6 UT for endpoint (#1243)Gravatar Chris O'Haver 1-2/+16
* ipv6 UT for endpoint * tweak
2017-11-15plugin/kubernetes: Fix reverse TTL response (#1240)Gravatar Miek Gieben 3-29/+29
Remove most 303 TTLs (those get skipped by the test) and use 5, which is the default for all tests.
2017-11-15plugin/kubernetes: set TTL on pod responses (#1239)Gravatar Miek Gieben 3-5/+5
The TTL was still zero, instead it should adhere to the k.ttl setting. Change this and update tests to match.
2017-11-15plugin/k8s: clean up and add some ipv6 tests (#1237)Gravatar Chris O'Haver 1-233/+138
* clean up and add some ipv6 tests * aaaa endpoint * gofmt
2017-11-13plugin/kubernetes: correctly set NODATA for ns (#1229)Gravatar Miek Gieben 8-10/+101
* plugin/kubernetes: Add GetNamespaceByName A bare or wildcard query for just the namespace should return NODATA, not NXDOMAIN, otherwise we deny the entirety of the names under the namespace. Add test to check for this in pod verified mode. * Review More comments and move namespace code to namespace.go
2017-11-13plugin/kubernetes: check err in getClientConfig (#1230)Gravatar Andy Goldstein 1-0/+3
Check the error returned by clientConfig.ClientConfig() before trying to set cc.ContentType. Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-13plugin/health: implement dyn health checks (#1214)Gravatar Miek Gieben 2-0/+9
Implement health.Healther in erratic and kubernetes plugin. The kubernetes' healtcheck is only performed on startup - i.e. turn healthy after the initial loading. Erratic follow the drop count: every query%drop turns the healthcheck unhealthy. Fixes: #985
2017-11-10plugin/k8s: fix endpoint index creation (#1222)Gravatar Chris O'Haver 1-3/+9
2017-11-10plugin/k8s: Use service IP index in reverse lookups (#1212)Gravatar Chris O'Haver 2-16/+27
* use index for svc reverse lookup * temp revert * restore reverse.go * restore reverse_test.go
2017-11-08plugin/k8s: fix pods disabled behavior (#1207)Gravatar Chris O'Haver 2-5/+2
* fix pods disabled behavior * do away with pod mode specific error
2017-11-08k8s readme tweaks (#1206)Gravatar Chris O'Haver 1-5/+5
fix minor capitalization and grammar errors
2017-11-08Add option to use pod name rather than IP address for Kubernetes (#1190)Gravatar Brian Akins 6-23/+114
Change to use a new 'endpoints' directive and use a constant Add initial docs for 'endpoints' directive Add tests to Kubernetes setup for endpoints Changes based on PR feedback endpoint_pod_names is a boolean config option. Chahanged docs to reflect this. Add a test when endpoints_pod_names is not set Update README.md Remove endpointNameModeName as it is no longer used
2017-11-01plugin/{kubernetes/etcd}: dynamic SOA (#1188)Gravatar Miek Gieben 1-0/+17
Add a dynamic SOA record (at least the serial and minttl). This create another interface that should be implemented by the backends. For now default to returning epoch in as a uint32 (no change from before). Lower the minTTL returned to 30s (from 60s)
2017-10-31docs: updates some, remove others (#1187)Gravatar Miek Gieben 2-44/+1
Fix typo in kubernetes/README.md and remove DEV-README.md as it is stale and information on the website is more up to date. Remove large sections of text in plugin.md; just talk about how to structure your plugin and docs.
2017-10-24plugin/kubernetes: lazy initialze EndPointsList (#1168)Gravatar Miek Gieben 1-6/+11
If we don't need it, don't initialize it. Fixes #1156
2017-10-24CIDR query routing (#1159)Gravatar Miek Gieben 2-6/+5
* core: allow all CIDR ranges in zone specifications Allow (e.g.) a v4 reverse on a /17. If a zone is specified in such a way a FilterFunc is set in the config. This filter is checked against incoming queries. For all other queries this adds a 'x != nil' check which will not impact performace too much. Benchmark function is added as well to check for this as wel. Add multiple tests in tests/server_reverse_test.go. Benchmark shows in the non-reverse case this hardly impact the speed: ~~~ classless: pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1431 ns/op 16 B/op 1 allocs/op pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1429 ns/op 16 B/op 1 allocs/op master: pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1412 ns/op 16 B/op 1 allocs/op pkg: github.com/coredns/coredns/core/dnsserver BenchmarkCoreServeDNS-4 1000000 1429 ns/op 16 B/op 1 allocs/op ~~~ * README.md updates
2017-10-20plugin/kubernetes: implement HasSynced() (#1155)Gravatar Miek Gieben 8-19/+29
* plugin/kubernetes: wait until api is ready Wait for HasSynced before allowing startup to avoid startup race. Also do a small refactor in findServices() to pull a check out of the loop - only needs to be done once. * sigh
2017-10-17Plugin/Kubernetes: Service and Endpoint Indexing (#1149)Gravatar Sandeep Rajan 9-24/+425
* indexing * corrections
2017-10-15plugin/proxy: kick of HC on every 3rd failure (#1110)Gravatar Miek Gieben 1-13/+2
* 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-10doc update (#1140)Gravatar Miek Gieben 1-0/+1
* doc update Go through all README and fix mistakes, extend example and let more corefile snippets be test for validity. * Cant use spefic addr in test
2017-09-29plugin/kubernetes: Enable protobuf, Update client api package (#1114)Gravatar Chris O'Haver 13-467/+328
* vendor * code
2017-09-24healhcheck: various cleanups (#1106)Gravatar Miek Gieben 2-5/+3
* healhcheck: various cleanups Network wasn't used. IgnorePaths wasn't used. Move checkdown function to common function shared between proxy protocols. And some naming fixed. Also reset the Fails on a succesful healthcheck back to 0. remove newlines from log * compile * fix test
2017-09-21Fix autopath crash when pods verified not enabled (#1099)Gravatar John Belamaric 1-0/+3
2017-09-21pkg: add dnstest (#1098)Gravatar Miek Gieben 6-12/+12
Add a full test server impl in this new package + tests. Move dnsrecorder into this package as well and finish up the commented out tests that were left in the old dnsrecorder package. Update all callers and tests.
2017-09-15plugin: README.md updates (#1084)Gravatar Miek Gieben 1-2/+3
updates so the look better on coredns.io
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 25-0/+3445
* 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