Factor out as much of autopath into a subpackage as possible right now.
apw.Sent is not needed, we should see this from the rcode returned by
the middleware. See #852 on why this was needed.
Disable the tests for now as to not break the main build.
Put the autopath stuff in a separate sub package. Tests are still
included in the main kubernetes directory.
Next steps (after this is merged), is pulling the autopath handling
into the subpackage and fixing the tests.
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).
* 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
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.
* 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
* 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.
* 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
* 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
* 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
* dont require/allow "_" prefix for srv wildcard fields
* streamline parse/validation of req name
* removing nametemplate
* error when zone not found, loopify unit tests
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.
* 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.
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.
* 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
* 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