Open brianberzins opened 4 years ago
How about an option to read the local kubeconfig? Then you could run/debug pod-reaper locally.
@jdharmon I've done that on other projects before, and I think it's a great idea here. I additionally want to make it extremely easy to spin up a test cluster locally!
I tried to write e2e tests this weekend after reading Kubernetes End-to-end Testing for Everyone and using https://github.com/kubernetes-sigs/descheduler/blob/master/test/e2e/e2e_test.go as an example.
Their basic process is:
kind create cluster
docker pull kubernetes/pause
kind load docker-image kubernetes/pause
kind get kubeconfig > /tmp/admin.conf
go test ./test/e2e/ -v
I ran into a bunch of issues with packages, but will try again when I have time.
The Visual Studio Code Remote - Containers looks like it could be a good option. There is a Go demo: https://github.com/Microsoft/vscode-remote-try-go
Working on #42 and running some local testing of #40 made me think more about my local development. I found a lot of quick success playing around with KinD (kubernetes in docker) https://github.com/kubernetes-sigs/kind
I know that I probably overdo local testing on pod-reaper because I want to make sure that something that is capable of killing every pod in a cluster functioning like I want. As part of that, I want to make sure that I, and anyone else, has a quick and easy way to try out changes locally without throwing potentially dangerous prototype versions out into non-local docker repositories.