Commit graph

788 commits

Author SHA1 Message Date
Manuel de Brito Fontes
3be9e58ddf Revert k8s changes 2016-09-22 08:29:50 -03:00
Miek Gieben
e0a49b73b5 Build the release just like defined in Makefile 2016-09-22 09:54:03 +00:00
Manuel Alejandro de Brito Fontes
d250742d9e Fix k8s build () 2016-09-21 20:05:18 +01:00
Miek Gieben
5301c5af5f Run golint and go vet ()
Cleanup the errors and removed deadcode along the way. The leaves
some error laying around, mostly about commenting exported identifier.
We should look hard if those really are needed.
2016-09-21 17:01:19 +01:00
Zhipeng JIANG
7b79458c8a Fix typo in Readme. () 2016-09-20 11:04:16 +01:00
Miek Gieben
8555716046 Cleanups and tests ()
For some reasons there was a dnsserver/middleware.go that defined
the middleware handlers. This code was a repeat from
middleware/middleware.go. Removed dnsserver/middleware.go and replaced
all uses of dnsserver.Middleware with middleware.Middleware.

Added dnsserver/address_test.go to test the zone normalization (and to
improve the test coverage). The deleted file will also improve the test
coverage :)
2016-09-19 11:26:00 +01:00
Miek Gieben
1e706b5f21 Rename coverage.sh to .coverage.sh ()
This is "infrastructure/meta" code, don't need to see it.
2016-09-19 10:56:21 +01:00
Yong Tang
587a347a40 Add codecov.io processing with travis-ci integration. ()
This fix adds the codecov.io process with travis-ci integration,
so that code coverage could be processed and displayed with codecov.io.

Since go cannot use test profile flag with multiple packages,
we have to iterate through packages with `coverage.sh`.

Some consolidation could be done by combining them into one `make test`.

Will do some consolidation in a follow up PR.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-18 11:01:57 -07:00
Shawn Smith
1decf52cb2 fix typo () 2016-09-18 15:33:09 +01:00
Miek Gieben
a8fb01bfd2 releasing: reverse build order
Do linux last, so my go install isn't messed up. Use gh-release from
PATH.
2016-09-18 14:25:47 +01:00
Miek Gieben
338b77667b Add Makefile.release ()
Document the release process and encode it in Makefile.release. We
use gh-release to minimize the amount of effort required.
2016-09-18 14:14:01 +01:00
Miek Gieben
b440b1c8f6 docs: document default startup ()
Some small additions to the documentation.
2016-09-18 09:32:06 +01:00
Miek Gieben
ffa5530d0f update README 2016-09-17 21:28:59 +01:00
Miek Gieben
31851c6acd coredns: default Corefile ()
When no Corefile is given, default to loading the whoami middleware on
the default port (2053).  Also add back the -port flag that allows you
to override the default port.

Further cleanup the startup messages and use caddy's OnStartupComplete()
to blurp out which zones and ports we have.  These can be suppressed
with the -quiet flag.

Normal startup:

miek.nl.:1053
miek.nl2.:1053
example.org.:1054
2016/09/17 20:41:19 [INFO] CoreDNS-001 starting
CoreDNS-001 starting

with the -quiet flag:

2016/09/17 20:41:34 [INFO] CoreDNS-001 starting
2016-09-17 21:24:39 +01:00
Miek Gieben
80b22a5071 middleware/whois: hook it up
Hook it up properly by adding it to the directives list. And add
the Target to the SRV record to actually return valid DNS messages.
2016-09-17 17:50:16 +01:00
Miek Gieben
30fd224504 middleware/whoami: add ()
Add a new middleware that tells you who you are; IP, port and transport
is echoed back.

Also some various cleanup and documentation improvements while at it:

* ResponseWriter: improve the documentation of these helper functions.
* And add an NextHandler for use in tests. Make chaos_test.go and
* whoam_test.go use it.
2016-09-17 17:09:05 +01:00
Yong Tang
ed907d3327 Fix proxy upstream parser issue and add test cases ()
This fix tries to fix 261 where proxy upstream parser is not
able to parse upstream correctly.

Several test cases have also been added to cover the changes
and prevent regression in the future.

This fix fixes 261.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-17 07:49:35 +01:00
Yong Tang
50d47a55a2 Fix build error by change kubernetes controller to pkg/client/cache ()
Kubernetes moves informer and controller to pkg/client/cache, see:
https://github.com/kubernetes/kubernetes/pull/32718

As a result, coredns build is broken.

This fix fixes the build by making related change with kubernetes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-16 16:31:23 +01:00
Yong Tang
953cfc1de4 Remove lumberjack logger ()
* Removed lumberjack from coremain

As is mentioned in 251, this fix removed lumberjack from coremain.

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

* Remove lumberjack from log middleware

As mentioned in 251, lumberjack is not suitable for applications like CoreDNS
so it is removed from the log middleware.

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

* Update log/README.md as lumberjack has been removed

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

* Adjust default log output from `ioutil.Discard` to `os.Stdout`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-16 15:50:16 +01:00
Nagy Károly Gábriel
1c6dd35b23 Fixed () 2016-09-12 19:19:31 +01:00
Miek Gieben
2dd8a687b3 Startup notification ()
Stop the caddy message and start our own init notifications.
Log the version of CoreDNS when starting up.
Fix all middleware's setup functions so that return the error prefixed
with *which* middleware was failing; leads to better debuggable errors
when starting up.
2016-09-10 09:16:25 +01:00
Miek Gieben
5216ab6b58 Add tests for normalize.go
Fix some of the documentation in the process.
2016-09-07 12:55:41 +00:00
Miek Gieben
d1f17fa7e0 Cleanup: put middleware helper functions in pkgs ()
Move all (almost all) Go files in middleware into their
own packages. This makes for better naming and discoverability.

Lot of changes elsewhere to make this change.

The middleware.State was renamed to request.Request which is better,
but still does not cover all use-cases. It was also moved out middleware
because it is used by `dnsserver` as well.

A pkg/dnsutil packages was added for shared, handy, dns util functions.

All normalize functions are now put in normalize.go
2016-09-07 11:10:16 +01:00
Yong Tang
684330fd28 Add a test for health middleware ()
This commit adds a simple test of `TestHealth` for the middleware
of health so that there is basic coverage.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-07 10:01:27 +01:00
Miek Gieben
3fab9b1bfa caddy.CaddyfileFromPipe requires server type
Change to be inline with latest caddy changes, caddy.CaddyfileFromPipe
requires servertype argument.

Fixes: 
2016-09-06 08:31:51 +00:00
Miek Gieben
eea77cc97c Fs ()
* play around with fs idea

* docs and fix test

* better docs
2016-09-05 09:32:11 +01:00
Miek Gieben
e750a4c1bd Merge pull request from miekg/nsec3-warn
Better logging for NSEC3
2016-09-03 09:47:45 +01:00
Miek Gieben
99170ac62e Better logging for NSEC3
When dropping NSEC3 records provide better logging and add test
for NSEC3 records.
2016-09-03 09:37:36 +01:00
Miek Gieben
ea557b1502 README: fix twitter () 2016-08-31 07:15:21 +01:00
Brandon Philips
4b3863e7b9 README: fix twitter 2016-08-30 15:35:17 -07:00
Miek Gieben
9caa607173 Update docs
Update the file and dnssec docs and glarify what is implement and that
we only do NSEC.
2016-08-29 19:15:04 +01:00
Miek Gieben
2eac03896b Use Corefile
Fix the code copied from Caddy to refer to Corefile and make 'coredns'
with flags pickup a local Corefile.

Also remove some references to Caddy in the docs and output of coredns.

Fixes 
2016-08-29 14:39:24 +01:00
Miek Gieben
da5d7bea4b typos in middleware.md 2016-08-28 09:34:29 +01:00
Miek Gieben
c3d3ff2825 Merge branch 'cleanup-for-release' 2016-08-28 09:33:04 +01:00
Miek Gieben
0c57748be2 Rename RegisterDirective to RegisterDevDirective
There is no good reason to be different than Caddy and allows us to
piggyback on it's documentation.
2016-08-27 21:14:35 +01:00
Miek Gieben
7db3511efc Add RegisterDirective 2016-08-27 21:01:06 +01:00
Miek Gieben
676dc919a2 Remove conf/ dir
Adjust documentation for k8s and put contents of the k8sCorefile
in the README.md
2016-08-25 07:35:09 +01:00
Miek Gieben
1f943d4f2b Use new style form to register directives
See
17709a7d3f
where there was a slight change (for the better) on how to register.

Fix the CoreDNS to adhire to this. Needs Caddy from master to compile at
this moment.
2016-08-25 07:23:02 +01:00
Miek Gieben
b1bc08646d Fix complition
Fix "just push to master, because I know better" compilation error.
2016-08-24 22:09:49 +01:00
Miek Gieben
af6b3a6d02 Split out versions in version.go
The will prolly make automatic releases easier.
2016-08-24 21:43:47 +01:00
Miek Gieben
1c31f1e7f3 remove debug 2016-08-23 17:35:20 +01:00
Miek Gieben
47f4e165a0 Fix main startup ()
Set version and name of the program. And then call coremain.Run().

The coremain split makes CoreDNS embeddable.

Also see  for an old PR.
2016-08-23 16:36:29 +01:00
Michael Richmond
2153d2defd Fix k8s integration tests ()
* Adding debug message when starting k8s controller

* Adding work-around for timing issue in k8s integration tests

* Remove unused import

* Fix Makefile for ast package

* Increase k8s verbosity in travis

* Updating TODO list to find root cause of test issue

* go fmt cleanup
2016-08-23 07:15:21 +01:00
Miek Gieben
8c9c4778c6 Merge pull request from cricketliu/master
Second set of grammatical fixes
2016-08-22 22:42:54 +01:00
cricketliu
938ecbeab9 Update README.md
Grammatical fixes.
2016-08-22 14:40:24 -07:00
cricketliu
9a3fa013d6 Update README.md
Grammatical fixes.
2016-08-22 14:38:33 -07:00
Miek Gieben
7ac8ce952d Merge pull request from cricketliu/master
Some grammatical fixes to various README.md files
2016-08-22 22:35:33 +01:00
cricketliu
af6ebb7cd9 Update README.md
Grammatical fixes.
2016-08-22 14:33:40 -07:00
cricketliu
6b1d816d5a Update README.md
Grammatical fixes.
2016-08-22 14:29:50 -07:00
cricketliu
62a845ca2a Update README.md
Grammatical fixes.
2016-08-22 14:27:55 -07:00