diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 000000000..06ef1da0b --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,91 @@ +# Developing `kured` + +We love contributions to `kured`, no matter if you are [helping out on +Slack][slack], reporting or triaging [issues][issues] or contributing code +to `kured`. + +In any case, it will make sense to familiarise yourself with the main +[README][readme] to understand the different features and options, which is +helpful for testing. The "building" section in particular makes sense if +you are planning to contribute code. + +[slack]: README.md#getting-help +[issues]: https://github.com/weaveworks/kured/issues +[readme]: README.md + +## Updating k8s support + +Whenever we want to update e.g. [`kubectl` in the +image](cmd/kured/Dockerfile), we need to consider if we update `client-go` +as well, some RBAC changes might be necessary too. + +This is what it took to support Kubernetes 1.14: + + +That the process can be more involved that that can be seen in + + +Once you updated everything, make sure you update the support matrix on +the main [README][readme] as well. + +## Release testing + +Before `kured` is released, we want to make sure it still works fine on the +previous, current and next minor version of Kubernetes (with respect to the +embedded `client-go` & `kubectl`). For local testing e.g. `minikube` can be +sufficient. + +Deploy kured in your test scenario, make sure you pass the right `image`, +update the e.g. `period` and `reboot-days` options, so you get immediate +results, if you login to a node and run: + +```console +sudo touch /var/run/reboot-required +``` + +### Testing with `minikube` + +A test-run with `minikube` could look like this: + +```console +minikube start --vm-driver kvm2 --kubernetes-version + +# edit kured-ds.yaml to +# - point to new image +# - change e.g. period and reboot-days option for immediate results + +minikube kubectl -- apply -f kured-rbac.yaml +minikube kubectl -- apply -f kured-ds.yaml +minikube kubectl -- logs daemonset.apps/kured -n kube-system -f + +# In separate terminal +minikube ssh + sudo touch /var/run/reboot-required +minikube logs -f +``` + +Now check for the 'Commanding reboot' message and minikube going down. + +Unfortunately as of today, you are going to run into +. This means that +minikube won't come back easily. You will need to start minikube again. +Then you can check for the lock release. + +If all the tests ran well, kured maintainers can reach out to the Weaveworks +team to get an upcoming `kured` release tested in the Dev environment for +real life testing. + +## Publishing a new kured release + +This is the most straight-forward in the whole process. + +Picking a suitable tag and creating the release through the Github UI should +release the image just fine. + +### Release notes + +Please describe what's new and noteworthy in the release notes, list the PRs +that landed and give a shout-out to everyone who contributed. + +Please also note down on which releases the upcoming `kured` release was +tested on. diff --git a/README.md b/README.md index b3abe3318..e30c2d705 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,11 @@ make GO111MODULE=on make ``` +If you are interested in contributing code to kured, please take a look at +our [development][development] docs. + +[development]: DEVELOPMENT.md + ## Frequently Asked/Anticipated Questions ### Why is there no `latest` tag on Docker Hub?