aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/reverse.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-07-10add golangci-lint linter (#5499)Gravatar Ondřej Benkovský 1-1/+0
2020-10-30plugin/kubernetes: Watch EndpointSlices (#4209)Gravatar Chris O'Haver 1-1/+1
* initial commit Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * convert endpointslices to object.endpoints Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add opt hard coded for now Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * check that server supports endpointslice Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix import grouping Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * dont use endpoint slice in 1.17 or 1.18 Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * bump kind/k8s in circle ci to latest Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * drop k8s to latest supported by kind Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * use endpointslice name as endoint Name; index by Service name Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * use index key comparison in nsAddrs() Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add Index to object.Endpoint fixtures; fix direct endpoint name compares Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add slice dup check and test Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * todo Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add ep-slice skew dup test for reverse Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * nsaddrs: de-dup ep-slice skew dups; add test Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * remove todo Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * address various feedback Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * consolidate endpoint/slice informer code Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix endpoint informer consolidation; use clearer func name Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * log info; use major/minor fields Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix nsAddr and unit test Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add latency tracking for endpointslices Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * endpointslice latency unit test & fix Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * code shuffling Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * rename endpointslices in tests Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * remove de-dup from nsAddrs and test Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * remove de-dup from findServices / test Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-21return all records with matching ip (#3687)Gravatar Chris O'Haver 1-2/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2019-03-26Remove context.Context from request.Request (#2726)Gravatar Miek Gieben 1-2/+3
* 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>
2018-10-11Revert "use keys (#2167)" (#2188)Gravatar Miek Gieben 1-18/+18
This reverts commit 974ed086f25ad45a01947e276e2eb8aa73d007a3.
2018-10-10use keys (#2167)Gravatar Chris O'Haver 1-18/+18
2018-10-09plugin/kubernetes: allow trimming down of cached items. (#2128)Gravatar Miek Gieben 1-2/+2
* Convert to runtime.Object to smaller structs This adds conversion for all the objects we want to keep in the cache. It keeps the minimum for CoreDNS to function and throws away the rest. The conversion: api.Endpoints -> object.Endpoints api.Pod -> object.Pod api.Serivce -> object.Service We needed to copy some client-go stuff to insert a conversion function into NewIndexInformers. Some unrelated cleanups in the watch functionality as that needed to be touched because of the above translation of objects. Signed-off-by: Miek Gieben <miek@miek.nl> * Reduce test line-count Signed-off-by: Miek Gieben <miek@miek.nl> * ....and fix test Signed-off-by: Miek Gieben <miek@miek.nl> * Drop use of append Signed-off-by: Miek Gieben <miek@miek.nl> * cosmetic changes Signed-off-by: Miek Gieben <miek@miek.nl> * that was a typo Signed-off-by: Miek Gieben <miek@miek.nl> * re-introduce append here We can't really use len() here because we don't know the number before hand. Signed-off-by: Miek Gieben <miek@miek.nl> * comment in better place Signed-off-by: Miek Gieben <miek@miek.nl> * Make the timestamp a bool; thats where it is used for Signed-off-by: Miek Gieben <miek@miek.nl> * Set incoming object to nil Explicataliy discard the converted object; we did a deep copy it's not needed anymore. Signed-off-by: Miek Gieben <miek@miek.nl> * Per Chris's comment Signed-off-by: Miek Gieben <miek@miek.nl>
2018-02-28plugin/kubernetes: PTR/A reverse query corner cases (#1551)Gravatar Chris O'Haver 1-1/+2
* better handle non PTR rev zone qrys * vice versa * tests * comment typo * much cleaner
2018-02-13fix ptr nxdomain response and test (#1524)Gravatar Chris O'Haver 1-0/+3
2017-11-15plugin/kubernetes: Fix reverse TTL response (#1240)Gravatar Miek Gieben 1-4/+4
Remove most 303 TTLs (those get skipped by the test) and use 5, which is the default for all tests.
2017-11-10plugin/k8s: Use service IP index in reverse lookups (#1212)Gravatar Chris O'Haver 1-5/+3
* use index for svc reverse lookup * temp revert * restore reverse.go * restore reverse_test.go
2017-11-08Add option to use pod name rather than IP address for Kubernetes (#1190)Gravatar Brian Akins 1-1/+1
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-17Plugin/Kubernetes: Service and Endpoint Indexing (#1149)Gravatar Sandeep Rajan 1-1/+1
* indexing * corrections
2017-09-29plugin/kubernetes: Enable protobuf, Update client api package (#1114)Gravatar Chris O'Haver 1-5/+2
* vendor * code
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-0/+55
* 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