coredns/middleware/kubernetes/test
Michael Richmond 3f4ec783d2 Adding wildcard support (#190)
* Commenting out unused functions. TODO: remove when it is not needed

* Update README with namespace and template example

* Adding note about changing the record name format via a template

* Adding test scripts to automate k8s startup

* Automating k8s namespace creation

* Adding automation to start 4 k8s services

* Updating documentation for k8s tests

* Avoid downloading kubectl if already exists

* Adding debug statement when namespace is not exposed.

* Adding basic kubernetes integration tests

* Makefile now contains a "testk8s" target. This target requires k8s to
  be running.
* Adding test/kubernetes_test.go file with a couple of basic A record
  tests.

* Updating k8s integration tests to only run k8s integration tests

* Adding support for namespace wildcards

* Refactoring to move filtering logic to kubernetes.go file

* go fmt fixes

* Adding wildcard support for namespaces and service names

* Kubernetes integration tests updated for A records.
* Expanded record name assembly for answer section not yet implemented.
* Refactoring to focus k8sclient code just on accessing k8s API.
 Filtering now handled in kubernetes.go

* Adding wildcard test cases

* Adding skydns startup script. (To allow side by side testing of wildcards.)
* Commenting out record name assmebly based on NameTemplate. Need to improve template before this makes sense.

* Adding basic SRV integration tests

* Need to add verification for additional answer section

* Fixing comments and formatting

* Moving wildcard constants to vars

* Travis test execution appears to be failing on access to these
 constants

* Fixing access to util package

* Trying to work around Travis test bug

* Reverting to access kubernetes/util as "util"

Travis breakage is due to "Infoblox-CTO" in src path
2016-07-14 23:50:14 +02:00
..
00_run_k8s.sh Adding wildcard support (#190) 2016-07-14 23:50:14 +02:00
10_setup_kubectl.sh Adding wildcard support (#190) 2016-07-14 23:50:14 +02:00
15_run_skydns.sh Adding wildcard support (#190) 2016-07-14 23:50:14 +02:00
20_setup_k8s_services.sh Adding wildcard support (#190) 2016-07-14 23:50:14 +02:00
kill_all_containers.sh Adding wildcard support (#190) 2016-07-14 23:50:14 +02:00
README.md Adding wildcard support (#190) 2016-07-14 23:50:14 +02:00

Test scripts to automate kubernetes startup

Requirements: docker curl

The scripts in this directory startup kubernetes with docker as the container runtime. After starting kubernetes, a couple of kubernetes services are started to allow automatic testing of CoreDNS with kubernetes.

To use, run the scripts as:

$ ./00_run_k8s.sh && ./10_setup_kubectl.sh && ./20_setup_k8s_services.sh

After running the above scripts, kubernetes will be running on the localhost with the following services exposed:

~~ NAMESPACE NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE default kubernetes 10.0.0.1 443/TCP 48m demo mynginx 10.0.0.168 80/TCP 9m demo webserver 10.0.0.28 80/TCP 2m test mynginx 10.0.0.4 80/TCP 2m test webserver 10.0.0.39 80/TCP 2m ~~

Kubernetes and all running containers can be uncerimoniously stopped by running the kill_all_containers.sh script.

$ ./kill_all_containers.sh