aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-31kubernetes: bump to client-go 11.0.0 (#2854)Gravatar Chris O'Haver 2-4/+10
* client-go 11.0.0 * Core moved to CoreV1
2019-05-29Fix for #2842, instead of returning the first Pod, return the one whi… (#2846)Gravatar Andras Spitzer 2-0/+8
* Fix for #2842, instead of returning the first Pod, return the one which is Running * a more memory efficient version of the fix, string -> bool * fix with no extra fields in struct, return nil at Pod conversion if Pod is not Running * let Kuberneretes filter for Running Pods using FieldSelector * filter for Pods that are Running and Pending (implicit)
2019-05-07make ignore empty work with ext svc types (#2823)Gravatar Chris O'Haver 2-1/+11
2019-05-01kubernetes: never respond with NXDOMAIN for authority label (#2769)Gravatar Billie Cleek 2-3/+66
* kubernetes: never respond with NXDOMAIN for authority label Return a nodata response when trying to resolve the authority's label for a record type that doesn't match the record type of the authority. This guards against poisoning the authority record by requesting the wrong record type for the authority label. For instance, given an authoritative resolver that uses subdomain delegation for Kubernetes services of a cluster that's configured to use IPv4, the parent may be poisoned by querying it for the authority label of the cluster subdomain with a AAAA record type, which would otherwise (i.e. without this change) return an NXDOMAIN. That is, given cluster.example.com NS 10800 ns.dns.cluster.example.com ns.dns.cluster.example.com A 10800 10.0.1.2 The parent may be poisoned for the SOA TTL by querying it for a AAAA record of ns.dns.cluster.example.com, causing the parent to fail delegate properly until the SOA TTL lapses. * kubernetes: add tests for authority queries
2019-04-08plugins: remove `upstream [ADDRESS]` from docs (#2772)Gravatar Miek Gieben 1-6/+5
Various plugins still had this documented, the setup functions still allow it (which is fine), but update the docs that this arguments isn't there any more. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-04-08Run gofmt -w -s on codebase (#2773)Gravatar Miek Gieben 2-22/+22
This formats and simplifies all code by running gofmt -w -s on all Go files. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-04-02plugin/kubernetes: Disable resync by default (#2752)Gravatar John Belamaric 2-2/+3
* Disable resync by default * Document default resync
2019-04-01Bump the resync period to five hours (#2748)Gravatar John Belamaric 1-1/+1
2019-03-26restore change detection (#2696)Gravatar Chris O'Haver 2-3/+183
2019-03-26Remove context.Context from request.Request (#2726)Gravatar Miek Gieben 5-23/+26
* Remove context.Context from request.Request This removes the context from request.Request and makes all the changes in the code to make it compile again. It's all mechanical. It did unearth some weirdness in that the context was kept in handler structs which may cause havoc with concurrently handling of requests. Fixes #2721 Signed-off-by: Miek Gieben <miek@miek.nl> * Make test compile Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-22Add `namespace_labels` configuration for kubernetes plugin (#2707)Gravatar Matt Greenfield 9-40/+278
2019-03-20plugin/kubernetes: add ready function (#2709)Gravatar Miek Gieben 2-0/+9
* plugin/kubernetes: add ready function Add ready function as the health function is now gone. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix readme Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-11Remove proxy from kubernetes file (#2668)Gravatar Yong Tang 3-82/+0
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-07plugin/health: remove ability to poll other plugins (#2547)Gravatar Miek Gieben 2-10/+0
* plugin/health: remove ability to poll other plugins This mechanism defeats the purpose any plugin (mostly) caching can still be alive, we can probably forward queries still. Don't poll plugins, just tell the world we're up and running. It was only actually used in kubernetes; and there specifically would mean any network hiccup would NACK the entire server health. Fixes: #2534 Signed-off-by: Miek Gieben <miek@miek.nl> * update docs based on feedback Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-04Move *proxy* to external (#2651)Gravatar Yong Tang 1-9/+14
* Move *proxy* to external move the proxy plugin into coredns/proxy and remove it as a default plugin. Link the proxy to deprecated in plugin.cfg coredns/proxy doesn't compile because of the vendoring :( Signed-off-by: Miek Gieben <miek@miek.nl> * Add github.com/coredns/proxy Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-02-24Update deprecated link in doc (#2607)Gravatar LongKB 1-1/+1
Currently, the modified link is out of date. This patch aims to update this link to the working one that user can access. Co-Authored-By: Nguyen Phuong An <AnNP@vn.fujitsu.com> Signed-off-by: Kim Bao Long <longkb@vn.fujitsu.com>
2019-02-24plugin/kubernetes: create dns.Msg later (#2604)Gravatar Miek Gieben 1-18/+16
There is no need to do this at the top of the handler, move this down into the function. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-21Fix some typos in documents (#2592)Gravatar Xiao An 1-1/+1
Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-02-20Fix typos (#2584)Gravatar Guillaume Gelin 1-2/+2
2019-02-20Remove some duplicate worlds (#2582)Gravatar Nguyen Phuong An 1-1/+1
Signed-off-by: Nguyen Phuong An <AnNP@vn.fujitsu.com>
2019-02-17cleanup by fmt and remove redundant type declarations (#2563)Gravatar Sandeep Rajan 3-8/+8
2019-02-17Fix some typos (#2560)Gravatar Nguyen Quang Huy 1-1/+1
* Fix some typos Corect some words for reading more easily * Update NOERROR response code NOERROR is a response code so I revert the typo checking for it
2019-02-14Change http to https for security links (#2559)Gravatar Nguyen Van Trung 1-2/+2
Signed-off-by: Nguyen Van Trung <trungnv@vn.fujitsu.com>
2019-02-11Remove grpc watch functionality (#2549)Gravatar Miek Gieben 10-402/+30
This was added, but didn't see any use. For a large, complex chunk of code we should have some users of it. Remove all watch functionally from plugins, servers and packages. Fixes: #2548 Signed-off-by: Miek Gieben <miek@miek.nl>
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-29skip pushing watch updates when there are no watches (#2513)Gravatar Chris O'Haver 1-0/+12
2019-01-23Update README.md (#2490)Gravatar Chris O'Haver 1-2/+2
2019-01-19Stop importing testing in the main binary (#2479)Gravatar Miek Gieben 9-17/+40
* Stop importing testing in the main binary Stop importing "testing" into the main binary: * test/helpers.go imported it; remote that and change function signature * update all tests that use this Signed-off-by: Miek Gieben <miek@miek.nl> * Drop import testing from metrics plugin Signed-off-by: Miek Gieben <miek@miek.nl> * more fiddling Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-19set ttl for ns records (#2452)Gravatar Chris O'Haver 2-9/+9
2019-01-13Deprecate multiple endpoints for out-of-cluster k8s api (#2454)Gravatar Yong Tang 4-72/+6
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-13Fix setup_test in plugin/kubernetes (#2460)Gravatar Miek Gieben 1-1/+0
PR race condition, fix the test data for the setup. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-13Default to upstream to self (#2436)Gravatar Miek Gieben 3-78/+4
* 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-10fix soa min ttl in tests cases (#2451)Gravatar Chris O'Haver 7-30/+30
2019-01-10set minttl to ttl setting (#2446)Gravatar Chris O'Haver 8-31/+31
2019-01-08plugin/kubernetes: fix case preservation and add test (#2430)Gravatar Chris O'Haver 2-2/+74
* fix case preservation and add test * only fix case in k8s
2019-01-07Error out when multiple https endpoints are specified. (#2438)Gravatar Yong Tang 3-2/+26
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>
2019-01-05plugin/kubernetes: add memory usage guidelines (#2424)Gravatar Miek Gieben 1-0/+15
Add words in object.go on the memory use and put some future ideas in there to use even less (if we have to at some point). Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-30disable ra flag for several plugins (#2408)Gravatar Isolus 1-1/+1
* disable ra flag for several plugins * removed unnecessary assignment * removed more unnecessary assignments
2018-12-14Add new plugin: external - resolve k8s ingress and LB address with external ↵Gravatar Miek Gieben 5-1/+252
names (#2379) * Add new plugin: external This plugin works in conjunction with the kubernetes plugin and exports ingress and LB addresses as DNS records. It bypasses backend.go and backend_lookup.go flow because it is not needed. README, tests are implemented. The tests only exercise the unit tests, this has not been tested in any ci. Signed-off-by: Miek Gieben <miek@miek.nl> * Rename to k8s_external Signed-off-by: Miek Gieben <miek@miek.nl> * go gen Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-10map bool -> map struct{} (#2386)Gravatar Miek Gieben 1-2/+2
This clear out the remaining map[x]bool usage and moves the bool to an empty struct. Two note worthy other changes: * EnableChaos in the server is now also exported to make it show up in the documentation. * The auto plugin is left as is, because there the boolean is explicitaly set to false to signal 'to-be-deleted' and the key is left as-is. Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-08plugin/kubernetes: smaller map (#2383)Gravatar Miek Gieben 4-7/+7
* 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-12-08plugin/kubernetes: make prefix key in msg.Service a const (#2378)Gravatar Miek Gieben 2-9/+11
This is a relic from the etcd integration and only used to remove in the final answer returned to the client. We do need it. Make it a constant and only one character wide. Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-30allow ttl 0 (#2348)Gravatar Chris O'Haver 2-3/+3
2018-11-27Update README.md (#2341)Gravatar Cricket Liu 1-22/+22
Miscellaneous textual cleanup.
2018-11-16Set SOA record TTL as min of TTL/MINIMUM (#2295)Gravatar stuart nelson 6-25/+25
* Set SOA record TTL as min of TTL/MINIMUM According to https://tools.ietf.org/html/rfc2308#section-3: The TTL of this record is set from the minimum of the MINIMUM field of the SOA record and the TTL of the SOA itself, and indicates how long a resolver may cache the negative answer. Set the TTL accordingly so as to not always negative cache SOA records for 300 seconds. * Inline min func * Update SOA record tests * Fix types
2018-11-13plugin/kubernetes: Validate transfers are allowed (#2292)Gravatar Chris O'Haver 3-2/+105
* check allowed transfers * add tests for parsing, and comment about refactor
2018-11-12dont log error for non existant txt records (#2291)Gravatar Chris O'Haver 1-1/+1
2018-11-08add missed kubernetes option to syntax box (#2281)Gravatar DavadDi 1-0/+2
2018-11-07add opts.initPodCache to avoid panic (#2279)Gravatar DavadDi 1-0/+11
Automatically submitted.
2018-10-30Update README.md (#2253)Gravatar Francois Tur 1-0/+1