aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/setup.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-02-07Set klog's logtostderr flag (#2529)Gravatar Guy Templeton 1-2/+8
* Parse as well as setlogtostderr flag * Enforce setting of logtostderr for klog * Clearup comment on klog
2019-01-13Deprecate multiple endpoints for out-of-cluster k8s api (#2454)Gravatar Yong Tang 1-7/+3
This fix deprecates endpoints for out-of-cluster k8s api, The Corefile still takes multiple endpoints though only the first one is used. A warning is shown if there are multiple endpoints. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-13Default to upstream to self (#2436)Gravatar Miek Gieben 1-6/+2
* Default to upstream to self This is a backwards incompatible change. This is a massive (cleanup) PR where we default to resolving external names by the coredns process itself, instead of directly forwarding them to some upstream. This ignores any arguments `upstream` may have had and makes it depend on proxy/forward configuration in the Corefile. This allows resolved upstream names to be cached and we have better healthchecking of the upstreams. It also means there is only one way to resolve names, by either using the proxy or forward plugin. The proxy/forward lookup.go functions have been removed. This also lessen the dependency on proxy, meaning deprecating proxy will become easier. Some tests have been removed as well, or moved to the top-level test directory as they now require a full coredns process instead of just the plugin. For the etcd plugin, the entire StubZone resolving is *dropped*! This was a hacky (but working) solution to say the least. If someone cares deeply it can be brought back (maybe)? The pkg/upstream is now very small and almost does nothing. Also the New() function was changed to return a pointer to upstream.Upstream. It also returns only one parameter, so any stragglers using it will encounter a compile error. All documentation has been adapted. This affected the following plugins: * etcd * file * auto * secondary * federation * template * route53 A followup PR will make any upstream directives with arguments an error, right now they are ignored. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix etcd build - probably still fails unit test Signed-off-by: Miek Gieben <miek@miek.nl> * Slightly smarter lookup check in upstream Signed-off-by: Miek Gieben <miek@miek.nl> * Compilez Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-07Error out when multiple https endpoints are specified. (#2438)Gravatar Yong Tang 1-0/+9
This fix will error out when multiple https endpoints are specified, as additional work is needed to support beyond http. This fix fixes 1464. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-12-08plugin/kubernetes: smaller map (#2383)Gravatar Miek Gieben 1-1/+1
* plugin/kubernetes: smaller map to continue with a theme: the map[string]bool can be reduced to map[string]struct{} to reduce a tiny amount of memory. Signed-off-by: Miek Gieben <miek@miek.nl> * fix tests Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-30allow ttl 0 (#2348)Gravatar Chris O'Haver 1-2/+2
2018-10-22Unblock startup if kubernetes API is unavailable (#2126)Gravatar Kevin Nisbet 1-6/+12
2018-10-02Add Kubernetes auth providers (#2147)Gravatar John Belamaric 1-0/+8
* Import auth providers for K8s * Vendor updates for K8s auth providers * Remove Azure since it is not compiling * Update vendor to remove Azure dependencies
2018-09-28Support for kubeconfig files (#2053)Gravatar Zach Eddy 1-0/+12
* Add support for authentication with kubeconfig files * Update k8s plugin documentation * Fix whitespace in README and tests * Use clientcmd package to load kubeconfig file
2018-06-15plugin/forward: add REFUSED test (#1878)Gravatar Miek Gieben 1-1/+1
add a test to see if we copy the rcode correctly. Some minor cleanup in import ordering and renaming NewUpstream to New as we already are in the upstream package.
2018-05-23ADD ignoreemptyservice option for kubernetes plugin (#1813)Gravatar darkweaver87 1-0/+13
* ADD: ignoreemptyservice option for kubernetes plugin * Modify documentation and rename option to add space * UPD: Add unit tests * UPD: gofmt * Add unit test for ignore emptyservice * gofmt * xfr tests failed * Rename emptyservice to empty_service
2018-04-22Use logging (#1718)Gravatar Miek Gieben 1-0/+3
* update docs * plugins: use plugin specific logging Hooking up pkg/log also changed NewWithPlugin to just take a string instead of a plugin.Handler as that is more flexible and for instance the Root "plugin" doesn't implement it fully. Same logging from the reload plugin: .:1043 2018/04/22 08:56:37 [INFO] CoreDNS-1.1.1 2018/04/22 08:56:37 [INFO] linux/amd64, go1.10.1, CoreDNS-1.1.1 linux/amd64, go1.10.1, 2018/04/22 08:56:37 [INFO] plugin/reload: Running configuration MD5 = ec4c9c55cd19759ea1c46b8c45742b06 2018/04/22 08:56:54 [INFO] Reloading 2018/04/22 08:56:54 [INFO] plugin/reload: Running configuration MD5 = 9e2bfdd85bdc9cceb740ba9c80f34c1a 2018/04/22 08:56:54 [INFO] Reloading complete * update docs * better doc
2018-03-09plugin/kubernetes: make glog log to standard output (#1598)Gravatar Miek Gieben 1-0/+12
Jump through all the hoops to make this work.
2018-02-28return an error for multiple use of some plugins (#1559)Gravatar Miek Gieben 1-5/+11
* plugins: Return error for multiple use of some Return plugin.ErrOnce when a plugin that doesn't support it, is called mutliple times. This now adds it for: cache, dnssec, errors, forward, hosts, nsid. And changes it slightly in kubernetes, pprof, reload, root. * more tests
2018-02-28Rename reverse zone constants (#1568)Gravatar Miek Gieben 1-2/+3
Rename the constants to IP4arpa and IP6arpa (shorter and exported) and make IsReverse return the type of the reverse zone which could be handy for some callers. Also add tests for IsReverse()
2018-02-16plugin/kubernetes: Add noendpoints option (#1536)Gravatar Chris O'Haver 1-1/+7
* add noendpoints option * go fmt
2018-02-14plugin/kubernetes: Add upstream @self and loop count (#1484)Gravatar Chris O'Haver 1-7/+3
* add upstream @self and loop count * 1st round of feedback * allow argless upstream * update test * readmes * feedback
2018-02-12reqd changes (#1522)Gravatar Chris O'Haver 1-139/+156
2018-02-08support for zone transfer for kubernetes (#1259)Gravatar Brad Beam 1-0/+10
* 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-07plugin/kubernetes: Allow only one k8s section (#1497)Gravatar Chris O'Haver 1-1/+4
* allow only one k8s section * add test
2018-01-28pl/kubernetes: drop the comma parsing (#1453)Gravatar Miek Gieben 1-3/+1
Let caddyfile parser give us the token, the comma sep thing also didn't work. Fixes #1446
2018-01-07Simplify plugin/pkg/fall (#1358)Gravatar John Belamaric 1-3/+1
* 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 1-2/+3
* 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 1-6/+2
* Add zone filtering to fallthrough * Doh. gofmt * Update documentation
2017-11-08Add option to use pod name rather than IP address for Kubernetes (#1190)Gravatar Brian Akins 1-0/+7
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-10-20plugin/kubernetes: implement HasSynced() (#1155)Gravatar Miek Gieben 1-1/+7
* 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-09-29plugin/kubernetes: Enable protobuf, Update client api package (#1114)Gravatar Chris O'Haver 1-3/+3
* vendor * code
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-0/+208
* 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