aboutsummaryrefslogtreecommitdiff
path: root/middleware/kubernetes/kubernetes.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-04middleware/kubernetes: define consts (#824)Gravatar Miek Gieben 1-12/+17
Define two consts Pod and Svc, makes it stand out a little more when used in switches in case. We have opted for a new type, but then you need to convert them all the time with string(Foo).
2017-08-04Kubernetes srv (#823)Gravatar Markus Sommer 1-21/+29
* Treat absence of port/service in SRV as wildcard Normally, a SRV-request should have the form _<service>._<port>.<name>.<zone>. The k8s peer-finder which is used for bootstrapping by some applications will however query for SRV at <name>.<zone>. To compensate for this behaviour, treat the absence of _<service> and _<port> as wildcards. * Modified tests with new SRV behaviour Added a testcase for a SRV request without port & service Removed now valid query from invalidSRVQueries * Forgot to run gofmt on test/kubernetes_test.go
2017-08-03middleware/kubernetes: cleanup (#818)Gravatar Miek Gieben 1-9/+6
Drop the interfaceAddr interfaces and just use a function. Cleanup all fallout from that. Remove the use of global variables and cleanup the tests a bit.
2017-08-03mw/kubernete: small cleanup (#810)Gravatar Miek Gieben 1-20/+24
* mw/kubernete: small cleanup Small cleanup, avoid pointer to []msg.Services and just returns the msg.Service. * Actually compile * testss
2017-07-20middleware/kubernetes: fix aaaa response (#780)Gravatar Chris O'Haver 1-6/+7
* fix aaaa response * unit tests
2017-07-11k8s/autopath: Add CNAMES (#771)Gravatar Chris O'Haver 1-5/+4
* Add unit tests & cnames * more progress * fix * next mw dependent unit tests * add tests for OnNXDOMAIN * Add AAAA and ndots unit tests; fix request.NewWithQuestion * Correct default value in README * add CNAMEs to readme * review * fix autopath examples * fix and test CNAME response order
2017-07-01middleware/backend: add Records() to ServiceBackend interface (#770)Gravatar Mia Boulay 1-4/+9
2017-06-28middleware/kubernetes: Server side path lookups (#750)Gravatar Chris O'Haver 1-19/+52
* initial commit * add config options * add readme * rewording * revert unlreated change * normalize host domain path * add ndots opt, allow > 1 host domains, pull host domains from resolv.conf * implementing review feedback * update readme * use dns lib, config format, defaults * Correct autopath example.
2017-06-23dont load default vals from env (#751)Gravatar Chris O'Haver 1-3/+1
2017-06-14cleanup: go vet and golint run (#736)Gravatar Miek Gieben 1-2/+2
* cleanup: go vet and golint run Various cleanups trickered by go vet and golint. * Fix tests and lowercase all errors Lowercase all errors, some tests in kubernetes use errors from kubernetes which do start with a capital letter.
2017-06-14handle clusterIP endpoint queries (#730)Gravatar Chris O'Haver 1-32/+38
2017-06-14middleware/kubernetes: Implement current federation beta (#723)Gravatar Chris O'Haver 1-11/+66
* federation initial commit * UTs/bugfixes * federation bits * polish, cover UT gaps * add TODO * go fmt & todo note * remove unrelated change * pr changes * start node watcher * get real node name * remove unused case
2017-06-02unexpose InterfaceAddrser (#693)Gravatar Chris O'Haver 1-1/+1
2017-05-30Add k8s external service CNAMEs (#677)Gravatar Chris O'Haver 1-4/+31
* Add external service cnames * remove cruft * update CI k8s version * change CI k8s version * min k8s ver for ext services * trying k8s 1.5 * k8s 1.5 requires ports spec * remove kruft * update dns schema version
2017-05-25Some golint cleanup (#674)Gravatar Yong Tang 1-3/+2
This commit fixes some golint issues in `core/dnsserver` and `middleware/kubernetes`. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-05-22Handle K8s middleware NS record (#662)Gravatar Chris O'Haver 1-65/+76
* commit for testing in cluster * commit for testing in cluster * refactor and add ns.dns record * Release 007 * reduce heap allocations * gofmt * revert accidental Makefile commits * restore prior rcode for disabled pod mode * revert Makefile deltas * add unit tests * more unit tests * make isRequestInReverseRange easier to test * more unit tests * addressing review feedback * commit setup.go
2017-04-30Remove annoying INFO from k8s middleware (#655)Gravatar John Belamaric 1-3/+1
2017-04-19Add fallthrough support for Kubernetes (#626)Gravatar John Belamaric 1-0/+1
* Add fallthrough support for Kubernetes This enables registering other services in the same zone as Kubernetes services. This also re-orders the middleware chain so that Kubernetes comes before other types, in order to make this work out-of-the-box. * Remove extra line
2017-03-06middleware/kubernetes: doc cleanup (#571)Gravatar Miek Gieben 1-3/+1
Set of small cleanups.
2017-02-22Golint (#548)Gravatar Miek Gieben 1-1/+1
* linter fixes * Golint and format code * fmt
2017-02-22Fix import path `github.com/miekg/coredns` -> `github.com/coredns/coredns` ↵Gravatar Yong Tang 1-6/+6
(#547) This fix fixes import path from `github.com/miekg/coredns` -> `github.com/coredns/coredns`
2017-02-07Fix k8s PTR when all namespaces exposed (#507)Gravatar Chris O'Haver 1-2/+2
* check for no namespace filter * integration test
2017-02-01Allow cidr based reverse zone config (#500)Gravatar Chris O'Haver 1-0/+12
* add cidrs opt * remove state data from middleware object
2017-01-29Fix `go fmt`, `go lint`, and `go vet` issues (#494)Gravatar Yong Tang 1-10/+14
This fix fixes several `go fmt`, `go lint`, and `go vet` issues, to make goreportcard happy: https://goreportcard.com/report/github.com/miekg/coredns Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-23correct k8s name parsing response codes (#493)Gravatar Chris O'Haver 1-20/+14
2017-01-22only a * by itself is wild (#488)Gravatar Chris O'Haver 1-1/+1
2017-01-20Add pod cache and verified pod responses (#483)Gravatar Chris O'Haver 1-3/+25
* Add pod cache and verified pod responses * add ip indexing for pod cache
2017-01-15Add txt response per k8s specGravatar Chris OHaver 1-4/+30
2017-01-15dont require/allow "_" prefix for srv wildcard fields (#472)Gravatar Chris O'Haver 1-148/+101
* dont require/allow "_" prefix for srv wildcard fields * streamline parse/validation of req name * removing nametemplate * error when zone not found, loopify unit tests
2017-01-12Pod insecure2 (#479)Gravatar Chris O'Haver 1-1/+1
* return servfail for pod rqsts when pods disabled * Add integration test for disabled pod mode
2017-01-11Add insecure A records for pods (#475)Gravatar Chris O'Haver 1-16/+66
2017-01-05handle A/PTR/SRV for headless services/endpoints (#464)Gravatar Chris O'Haver 1-52/+201
* handle A/PTR/SRV for headless services/endpoints * error early if _proto will produce nothing * remove wc params + various style tweaks * Release 004 * handle A/PTR/SRV for headless services/endpoints * error early if _proto will produce nothing * remove wc params + various style tweaks * optimize srv prefix validation * poking travis * reduce response sizes, clean func params
2016-12-14Return no items if less than 3 items in service segmentsGravatar Dmytro Kislov 1-0/+3
2016-12-02Add A lookup for headless services (#451)Gravatar Chris O'Haver 1-6/+30
2016-11-15K8s Test Cleanup and Service PTRGravatar John Belamaric 1-1/+8
Change the CI setup for K8s to be simpler. Now it just creates a set of objects via a yaml file, making it very easy to modify the tests. Implement PTR for services.
2016-11-13Fix various issues with formatting and typos (#424)Gravatar Michael Grosser 1-1/+1
* Fix typos * Simplify code * Fix error usage
2016-11-11More idiomatic GoGravatar Miek Gieben 1-5/+5
2016-11-10Return NXDOMAIN when no items match query (#422)Gravatar Chris O'Haver 1-5/+7
* When no records match, reply with NXDOMAIN * Implement in IsNameError * case for unexposed namespace. k8s integation tests * Fix imports order. Lower case of err strs.
2016-11-05BackendService: add Reverse method (#381)Gravatar Miek Gieben 1-10/+14
Add a Reverse method to BackendService because different backends want to to do diff. things. This allows etc/k8s to share even more code and we can unify the PTR handling.
2016-11-05Fix k8s client (#379)Gravatar John Belamaric 1-23/+29
* Fix k8s client to use client-go * Fix Kubernetes Build Issue The client-go code requires you to vendor. I have done a hack here in the Makefile to vendor it to version 1.5. But looks like we will need to do this the 'right' way soon. * Convert v1 to api Objects in List Functions Also removed the endpoint controller which was not used for anything. The Watch functions may still need the same treatment. * Vendor client-go release-1.5 * Fix basic SRV feature This is actually not serving SRV records correctly, but this should get it to work as it did prior to the k8s client changes. Another fix will be needed to serve SRV records as defined in the spec. * Add additional output in test result Add the response to the test output. * Fix erroneous test data
2016-10-30ServiceBackend interface (#369)Gravatar Miek Gieben 1-20/+40
* Add ServiceBackend interface This adds a ServiceBackend interface that is shared between etcd/etcd3 (later) and kubernetes, leading to a massive reduction in code. When returning the specific records from their backend. Fixes #273
2016-10-30Fix k8s build (#373)Gravatar Manuel Alejandro de Brito Fontes 1-2/+2
2016-10-19Enable use of a service account in-cluster. (#349)Gravatar John Belamaric 1-0/+6
2016-10-12cleanups: go vet/golint (#331)Gravatar Miek Gieben 1-6/+6
Go vet and golint the new code once again. Drop Name from NameTemplate - it's cleaner: nametemplate.Template.
2016-09-25Doc: add package docs (#296)Gravatar Miek Gieben 1-1/+1
* Doc: add package docs Add short package level docs to make godoc looks nicer. Add some badges to the README. * correct url
2016-09-23Add TLS support for k8s middleware (#289)Gravatar Chris O'Haver 1-6/+28
* Added TLS to k8s client Added options for TLS kubernetes client connection. * Fix k8s TLS config option parsing Brings config option parsing for kubernetes TLS in line with recent changes. * Put TLS config on one line Put kubernetes tls config on one line to match style established in etcd tls config. * Add tls option to README
2016-09-23Lister refactor kubernetes/kubernetes#33269Gravatar Manuel de Brito Fontes 1-6/+6
2016-09-23Remove unused const blockGravatar Manuel de Brito Fontes 1-8/+0
2016-09-23Refactoring of k8s helpersGravatar Manuel de Brito Fontes 1-9/+15
2016-09-23Golint2 (#280)Gravatar Miek Gieben 1-2/+5
* Fix linter errors * More linting fixes * More docs and making members private that dont need to be public * Fix linter errors * More linting fixes * More docs and making members private that dont need to be public * More lint fixes This leaves: ~~~ middleware/kubernetes/nametemplate/nametemplate.go:64:6: exported type NameTemplate should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:71:1: exported method NameTemplate.SetTemplate should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:108:1: exported method NameTemplate.GetZoneFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:116:1: exported method NameTemplate.GetNamespaceFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:120:1: exported method NameTemplate.GetServiceFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:124:1: exported method NameTemplate.GetTypeFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:135:1: exported method NameTemplate.GetSymbolFromSegmentArray should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:167:1: exported method NameTemplate.IsValid should have comment or be unexported middleware/kubernetes/nametemplate/nametemplate.go:182:6: exported type NameValues should have comment or be unexported middleware/kubernetes/util/util.go:1:1: package comment should be of the form "Package util ..." middleware/kubernetes/util/util.go:27:2: exported const WildcardStar should have comment (or a comment on this block) or be unexported middleware/proxy/lookup.go:66:1: exported method Proxy.Forward should have comment or be unexported middleware/proxy/proxy.go:24:6: exported type Client should have comment or be unexported middleware/proxy/proxy.go:107:1: exported function Clients should have comment or be unexported middleware/proxy/reverseproxy.go:10:6: exported type ReverseProxy should have comment or be unexported middleware/proxy/reverseproxy.go:16:1: exported method ReverseProxy.ServeDNS should have comment or be unexported middleware/proxy/upstream.go:42:6: exported type Options should have comment or be unexported ~~~ I plan on reworking the proxy anyway, so I'll leave that be.