Sign inSign up

srossross/k8s-test-controller

By srossross

•Updated over 8 years ago

e2e testing in k8s

Image
1

50K+

srossross/k8s-test-controller repository overview

⁠k8s-test-controller

Add test resources to test your Kubernetes cluster setup.

⁠Check out the docs⁠

⁠Development

⁠Generating code

If you change any API types, you must regenerate all of the supporting code. This can be done by using the generate make target, e.g.

$ make generate

The generators tend not to error even if something you may consider to be a problem occurs, thus it's important to ensure you can still build your application after running the generators.

⁠Building

The actual golang app can be built with a simple go build. The generated files required are committed to the repo to ensure it stays in sync. We should also use a verify step to ensure that the generated files are in sync with their respective types.go files, but for brevity have omitted that here.

$ go build

⁠Running

Running the application is as follows:

$ go run main.go -kubeconfig ~/.kube/config

Then we can go ahead and create a Tests and TestRuns!

$ kubectl create -f docs/tests.yaml
$ kubectl create -f docs/test-run.yaml

Tag summary

Content type

Image

Digest

Size

9.6 MB

Last updated

over 8 years ago

docker pull srossross/k8s-test-controller