aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/object (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-08-02auto go fmtGravatar coredns[bot] 1-2/+2
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-29kubernetes: Improve namespace usage (#4767)Gravatar Mat Lowery 1-0/+61
* Use GetByKey instead of List in GetNamespaceByName. * Add ToNamespace to reduce memory for namespace cache. Signed-off-by: Mat Lowery <mlowery@ebay.com>
2021-05-17consider nil ready as ready (#4632)Gravatar Chris O'Haver 1-2/+11
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-10copy unready exclusion to v1beta1 func (#4616)Gravatar Chris O'Haver 1-0/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-10plugin/kubernetes: Support both v1 and v1beta1 EndpointSlices (#4570)Gravatar Chris O'Haver 1-1/+47
* support v1 and v1beta1 endpointslice Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * update comments Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-04collect endpoint node name from endopintslices (#4581)Gravatar Chris O'Haver 1-1/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-04-27exclude unready endpoints from endpointslices (#4580)Gravatar Chris O'Haver 1-0/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-01-06Fix golint issue caused by typo (#4365)Gravatar Guangwen Feng 1-1/+1
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2020-12-21plugin/kubernetes: Add support for dual stack ClusterIP Services (#4339)Gravatar Chris O'Haver 2-4/+16
* support dual stack clusterIPs Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * stickler Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix ClusterIPs make Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-12-01plugin/kubernetes: Fix dns programming duration metric (#4255)Gravatar Chris O'Haver 6-82/+143
* get data reqd to record latency before calling toFuncs * refactor out unnecessary toFunc wrappers * remove latency metric unit tests per PR feedback Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-10-30plugin/kubernetes: Watch EndpointSlices (#4209)Gravatar Chris O'Haver 2-2/+58
* 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-09-01Fix some typos in comments. (#4100)Gravatar Hu Shuai 2-2/+2
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-06-15plugin/kubernetes: fix tombstone unwrapping (#3924)Gravatar Chris O'Haver 2-12/+36
* fix tombstone unwrapping Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-05-29k8s_external can now resolve CNAME returned by AWS ELB/NLB (#3916)Gravatar Michael Kashin 1-1/+6
Automatically submitted.
2020-05-15plugin/kubernetes: handle tombstones in default processor (#3890)Gravatar Chris O'Haver 4-25/+45
* handle deletion tombstones in default processor Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix terminating pod exclusion Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-05-14plugin/kubernetes: Handle endpoint tombstones (#3887)Gravatar Chris O'Haver 1-7/+2
* check for nil Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * handle tombstone Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * move casting to caller. add comments. Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * more sanding Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * more scrubbing Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * move object unwraping to switch cases Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * oops remove debug Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * remove cruft Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2019-12-18bump k8s releated library (#3552)Gravatar Zou Nengren 1-6/+0
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
2019-10-04Measure and expose DNS programming latency from Kubernetes plugin. (#3171)Gravatar janluk 5-20/+43
For now metric is measure only for headless services. Informer has been slighlty refactored, so the code can measure latency without storing extra fields on Endpoint struct. Signed-off-by: Janek Łukaszewicz <janluk@google.com> Suggestions from code review Co-Authored-By: Chris O'Haver <cohaver@infoblox.com>
2019-09-26fix mis-spelling (#3310)Gravatar xieyanker 1-1/+1
Signed-off-by: xieyanker <xjsisnice@gmail.com>
2019-08-21typo fixes (#3169)Gravatar Chris O'Haver 1-1/+1
* spelling fixes * its/it's
2019-08-19Change the ToEndpoints method comment to replace the Service with Endpoints ↵Gravatar Xigang Wang 1-1/+1
(#3146)
2019-08-16fix mis-spelling in object.go (#3134)Gravatar AllenZMC 1-1/+1
2019-07-03ISSUE-2911 (#2923)Gravatar Anshul Sharma 1-4/+4
- Remove resyncperiod from Kubernetes plugin
2019-06-01plugin/kubernetes: skip deleting pods (#2853)Gravatar Miek Gieben 3-4/+6
Don't add pods to our internal cache that are being deleted. This saves a field in the struct as well. Add (extra) comments about adding fields to the object/{Pod,Service,Endpoint} structs. Signed-off-by: Miek Gieben <miek@miek.nl>
2019-05-31kubernetes: bump to client-go 11.0.0 (#2854)Gravatar Chris O'Haver 1-0/+6
* client-go 11.0.0 * Core moved to CoreV1
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-14Add new plugin: external - resolve k8s ingress and LB address with external ↵Gravatar Miek Gieben 1-0/+12
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-10-11Revert "use keys (#2167)" (#2188)Gravatar Miek Gieben 2-3/+3
This reverts commit 974ed086f25ad45a01947e276e2eb8aa73d007a3.
2018-10-10use keys (#2167)Gravatar Chris O'Haver 2-3/+3
2018-10-09plugin/kubernetes: allow trimming down of cached items. (#2128)Gravatar Miek Gieben 5-0/+468
* 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>