Commit graph

93 commits

Author SHA1 Message Date
Miek Gieben
e49ca86ce4 cleanup: go vet and golint run (#736)
* cleanup: go vet and golint run

Various cleanups trickered by go vet and golint.

* Fix tests and lowercase all errors

Lowercase all errors, some tests in kubernetes use errors from
kubernetes which do start with a capital letter.
2017-06-14 09:37:10 -07:00
Chris O'Haver
5c10eba31c handle clusterIP endpoint queries (#730) 2017-06-14 10:29:41 -04:00
Chris O'Haver
930c54ef62 middleware/kubernetes: Implement current federation beta (#723)
* federation initial commit

* UTs/bugfixes

* federation bits

* polish, cover UT gaps

* add TODO

* go fmt & todo note

* remove unrelated change

* pr changes

* start node watcher

* get real node name

* remove unused case
2017-06-14 09:38:00 -04:00
Chris O'Haver
2ec96e0bb5 remove unused funcs (#724) 2017-06-09 08:00:09 +01:00
Chris O'Haver
18bc52b5e0 add more coverage (#702) 2017-06-03 08:27:24 +01:00
Chris O'Haver
ecae087201 unexpose items per lint (#701) 2017-06-02 23:54:33 -04:00
Chris O'Haver
d684dedfd3 unexpose InterfaceAddrser (#693) 2017-06-02 07:25:33 +01:00
Chris O'Haver
381ec9d7f8 fix typo (#692) 2017-06-01 22:44:10 -04:00
Chris O'Haver
d917ff5ac2 Add k8s external service CNAMEs (#677)
* Add external service cnames

* remove cruft

* update CI k8s version

* change CI k8s version

* min k8s ver for ext services

* trying k8s 1.5

* k8s 1.5 requires ports spec

* remove kruft

* update dns schema version
2017-05-30 13:20:39 +01:00
Manuel Alejandro de Brito Fontes
7c8d1b0234 Check that all the controllers are synced agains api server (#671) 2017-05-25 20:08:44 +01:00
Yong Tang
37050dc217 Some golint cleanup (#674)
This commit fixes some golint issues in `core/dnsserver`
and `middleware/kubernetes`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-05-25 20:08:34 +01:00
Chris O'Haver
7f950e496a Handle K8s middleware NS record (#662)
* commit for testing in cluster

* commit for testing in cluster

* refactor and add ns.dns record

* Release 007

* reduce heap allocations

* gofmt

* revert accidental Makefile commits

* restore prior rcode for disabled pod mode

* revert Makefile deltas

* add unit tests

* more unit tests

* make isRequestInReverseRange easier to test

* more unit tests

* addressing review feedback

* commit setup.go
2017-05-22 16:05:48 -04:00
John Belamaric
6062e58c59 Remove annoying INFO from k8s middleware (#655) 2017-04-30 08:48:37 +01:00
John Belamaric
8fc7ec776d Update the various Kubernetes middleware README files. (#630) 2017-04-19 22:42:45 +01:00
John Belamaric
1c53d4130e Add fallthrough support for Kubernetes (#626)
* Add fallthrough support for Kubernetes

This enables registering other services in the same zone as
Kubernetes services. This also re-orders the middleware chain
so that Kubernetes comes before other types, in order to make
this work out-of-the-box.

* Remove extra line
2017-04-19 16:08:30 -04:00
Miek Gieben
d1bb4ea130 Don't error log NXDOMAIN (#572)
In both etcd and k8s don't error log NXDOMAIN as this log spams the logs
for no good reason.

Fixes #568

Better long term solution is log rate limiting for both *log* and
*error*.
2017-03-06 11:43:23 +00:00
Miek Gieben
12678ac5e2 middleware/kubernetes: doc cleanup (#571)
Set of small cleanups.
2017-03-06 11:42:59 +00:00
John Belamaric
838427c95d Remove deployment helpers that are now in coredns/deployment/kubernetes (#554) 2017-02-22 21:44:20 +00:00
Miek Gieben
bf82f007fa Fix test (#549) 2017-02-22 09:23:41 +00:00
Miek Gieben
c5224b1048 Golint (#548)
* linter fixes

* Golint and format code

* fmt
2017-02-22 07:25:58 +00:00
Yong Tang
81af74aad0 Fix import path github.com/miekg/coredns -> github.com/coredns/coredns (#547)
This fix fixes import path from
`github.com/miekg/coredns`
->
`github.com/coredns/coredns`
2017-02-22 06:51:47 +00:00
John Belamaric
87a39a6353 Update to point to coredns/coredns image (#517) 2017-02-09 21:58:32 +00:00
Chris O'Haver
353c1c6487 Fix k8s chaining (#510)
* fix k8s next middleware chaining

* add chain to integration tests

* if nit
2017-02-08 12:53:55 -05:00
Chris O'Haver
4b6860fc81 Fix k8s PTR when all namespaces exposed (#507)
* check for no namespace filter

* integration test
2017-02-07 16:22:43 -05:00
Chris O'Haver
fd4c5b5744 Fix no PTR records response for cidr ranges (#506)
* set zone for cidr based PTRs

* set zone to request
2017-02-07 13:58:52 -05:00
John Belamaric
e8ebcd3cfd * Add script to generate manifest (#504) 2017-02-07 07:36:01 +00:00
Chris O'Haver
77f957d443 k8s middleware add tests and docs update (#501)
* add cidrs opt

* remove state data from middleware object

* update k8s docs

* Add integration tests

* add unit tests for cidr and pods config

* more README fixes, separate dev notes

* adjust section headers

* fix typo
2017-02-02 16:51:42 -05:00
Chris O'Haver
8beb1b2166 Allow cidr based reverse zone config (#500)
* add cidrs opt

* remove state data from middleware object
2017-02-01 12:56:10 -05:00
Yong Tang
738067a3c7 Fix go fmt, go lint, and go vet issues (#494)
This fix fixes several `go fmt`, `go lint`, and `go vet` issues,
to make goreportcard happy:

https://goreportcard.com/report/github.com/miekg/coredns

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-29 20:06:26 +00:00
Chris O'Haver
c62bd639ff correct k8s name parsing response codes (#493) 2017-01-23 20:11:32 +00:00
Chris O'Haver
a1215974ee only a * by itself is wild (#488) 2017-01-22 08:15:12 +00:00
Chris O'Haver
adfd7d5b19 Add pod cache and verified pod responses (#483)
* Add pod cache and verified pod responses

* add ip indexing for pod cache
2017-01-20 07:22:11 +00:00
Chris OHaver
2d0b8293a4 Add txt response per k8s spec 2017-01-15 14:37:18 +00:00
Chris O'Haver
a6d232a622 dont require/allow "_" prefix for srv wildcard fields (#472)
* dont require/allow "_" prefix for srv wildcard fields

* streamline parse/validation of req name

* removing nametemplate

* error when zone not found, loopify unit tests
2017-01-15 08:12:28 +00:00
Chris O'Haver
b6a2a5aeaa Pod insecure2 (#479)
* return servfail for pod rqsts when pods disabled

* Add integration test for disabled pod mode
2017-01-12 11:57:00 -05:00
Chris O'Haver
0ee88d3007 Add insecure A records for pods (#475) 2017-01-11 21:23:10 +00:00
Chris O'Haver
9a5e0c64fd handle A/PTR/SRV for headless services/endpoints (#464)
* handle A/PTR/SRV for headless services/endpoints

* error early if _proto will produce nothing

* remove wc params + various style tweaks

* Release 004

* handle A/PTR/SRV for headless services/endpoints

* error early if _proto will produce nothing

* remove wc params + various style tweaks

* optimize srv prefix validation

* poking travis

* reduce response sizes, clean func params
2017-01-05 15:09:59 +00:00
Miek Gieben
c4ab98c6e3 Add middleware.NextOrFailure (#462)
This checks if the next middleware to be called is nil, and if so returns
ServerFailure and an error. This makes the next calling more robust and
saves some lines of code.

Also prefix the error with the name of the middleware to aid in
debugging.
2016-12-20 18:58:05 +00:00
Dmytro Kislov
8cb5a05798 Return no items if less than 3 items in service segments 2016-12-14 16:17:14 +00:00
Chris O'Haver
56d3b47d11 Add A lookup for headless services (#451) 2016-12-02 22:50:01 +00:00
John Belamaric
afe4368c34 K8s Test Cleanup and Service PTR
Change the CI setup for K8s to be simpler. Now it just creates a
set of objects via a yaml file, making it very easy to modify
the tests.

Implement PTR for services.
2016-11-15 01:35:24 +00:00
Yong Tang
137fc33b8f Fix several typos in docs. (#426)
Fixes several typos in docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-14 07:25:17 +00:00
Michael Grosser
ece3cf8ecf Fix various issues with formatting and typos (#424)
* Fix typos

* Simplify code

* Fix error usage
2016-11-13 14:03:12 +00:00
Miek Gieben
651f3938a1 More idiomatic Go 2016-11-11 16:56:15 +00:00
Chris O'Haver
96206cdbc3 Return NXDOMAIN when no items match query (#422)
* When no records match, reply with NXDOMAIN

* Implement in IsNameError

* case for unexposed namespace. k8s integation tests

* Fix imports order. Lower case of err strs.
2016-11-10 21:24:06 +00:00
Chris O'Haver
48e1909218 Add type to default template 2016-11-09 21:07:27 +00:00
Miek Gieben
fb7fcff982 middleware/file|auto: Notifies and AXFR (#399)
Be more explicit in the logs when a notify fails.
New notify error message looks like:

2016/11/07 18:21:42 [ERROR] Notify for zone "example.org." was not accepted by "8.8.8.8:53": rcode was "SERVFAIL"

Correctly pick up secondaries

When multiple secondary are specified make sure they are picked up.

Fixes #393 #398
2016-11-07 19:15:21 +00:00
John Belamaric
4318dfbf02 Fix Kubernetes Watches (#392)
The watchers were still trying to process raw v1 objects which
failed to be added to the store. This meant new services and
namespaces created after CoreDNS started would not be discoverable.

Add a filter function that converts watch events with v1 objects
to events with api objects.
2016-11-07 16:21:24 +00:00
Miek Gieben
0f22d32191 Fix compilation error 2016-11-07 10:33:48 +00:00
Miek Gieben
fc85754849 Golint (#386)
Lint and vet the curret code add docs about adding a git post-commit
hook that performs these actions after each commit.
2016-11-07 07:43:38 +00:00