aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/kubernetes.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-05plugin/kubernetes: partial fix for crazy pod queries (#1349)Gravatar Miek Gieben 1-9/+13
This is probably the first in a series to fix "crazy" pod queries. If the namespace doesn't exist return NXDOMAIN. It might be worth extending this 1:1 to findServices as well.
2018-01-03Update k8s client-go to v6.0.0 (#1340)Gravatar Yong Tang 1-1/+1
* Update k8s client-go to v6.0.0 This fix updates k8s client-go to v6.0.0 as CoreDNS is supported in 1.9 and v6.0.0 is the recommended version. There are quite some massive changes that need to be made: 1. k8s.io/client-go/pkg/api/v1 has been changed to k8s.io/api/v1 (repo changed from `client-go` to `api`) 2. kubernetes.Clientset adds one extra layer, so that `kubernetes.Clientset.Services()` and like has been changed to `kubernetes.Clientset.CoreV1().Services()` Also, we have to stick with specific commits of `k8s.io/apimachinery` and the newly introduced `k8s.io/api` because go dep still could not figure out the right version to fetch. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update vendor with `dep ensure --update` and `dep prune` Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-12-07Consolidating const declarations (#1287)Gravatar Brad Beam 1-9/+6
2017-11-22fix external service type check (#1246)Gravatar Chris O'Haver 1-3/+2
2017-11-15plugin/kubernetes: set TTL on pod responses (#1239)Gravatar Miek Gieben 1-2/+2
The TTL was still zero, instead it should adhere to the k.ttl setting. Change this and update tests to match.
2017-11-13plugin/kubernetes: correctly set NODATA for ns (#1229)Gravatar Miek Gieben 1-10/+15
* plugin/kubernetes: Add GetNamespaceByName A bare or wildcard query for just the namespace should return NODATA, not NXDOMAIN, otherwise we deny the entirety of the names under the namespace. Add test to check for this in pod verified mode. * Review More comments and move namespace code to namespace.go
2017-11-13plugin/kubernetes: check err in getClientConfig (#1230)Gravatar Andy Goldstein 1-0/+3
Check the error returned by clientConfig.ClientConfig() before trying to set cc.ContentType. Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-11-08plugin/k8s: fix pods disabled behavior (#1207)Gravatar Chris O'Haver 1-2/+1
* fix pods disabled behavior * do away with pod mode specific error
2017-11-08Add option to use pod name rather than IP address for Kubernetes (#1190)Gravatar Brian Akins 1-16/+20
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-24plugin/kubernetes: lazy initialze EndPointsList (#1168)Gravatar Miek Gieben 1-6/+11
If we don't need it, don't initialize it. Fixes #1156
2017-10-20plugin/kubernetes: implement HasSynced() (#1155)Gravatar Miek Gieben 1-6/+3
* plugin/kubernetes: wait until api is ready Wait for HasSynced before allowing startup to avoid startup race. Also do a small refactor in findServices() to pull a check out of the loop - only needs to be done once. * sigh
2017-10-17Plugin/Kubernetes: Service and Endpoint Indexing (#1149)Gravatar Sandeep Rajan 1-4/+19
* indexing * corrections
2017-10-15plugin/proxy: kick of HC on every 3rd failure (#1110)Gravatar Miek Gieben 1-13/+2
* healthchecks: check on every 3rd failure Check on every third failure and some cleanups to make this possible. A failed healthcheck will never increase Fails, a successfull healthceck will reset Fails to 0. This is a chance this counter now drops below 0, making the upstream super? healthy. This removes the okUntil smartness and condences everything back to 1 metrics: Fails; so it's simpler in that regard. Timout errors are *not* attributed to the local upstream, and don't get counted into the Fails anymore. Meaning the 'dig any isc.org' won't kill your upstream. Added extra test the see if the Fails counter gets reset after 3 failed connection. There is still a disconnect beween HTTP healthceck working the proxy (or lookup) not being able to connect to the upstream. * Fix tests
2017-09-29plugin/kubernetes: Enable protobuf, Update client api package (#1114)Gravatar Chris O'Haver 1-21/+20
* vendor * code
2017-09-24healhcheck: various cleanups (#1106)Gravatar Miek Gieben 1-2/+2
* healhcheck: various cleanups Network wasn't used. IgnorePaths wasn't used. Move checkdown function to common function shared between proxy protocols. And some naming fixed. Also reset the Fails on a succesful healthcheck back to 0. remove newlines from log * compile * fix test
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-0/+457
* 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