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
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.
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>
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>
* 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>
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.
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
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>
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#235
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.
* 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