This document explains how to install and run the project on a local minikube cluster.
- Download gpg here
- Generating a new
gpgkey - Add
gpgkey to your GitHub account - Tell git about your signing key
- Automatically sign all commits
To get started, we need to have the following software installed:
- docker
- minikube (1: Installation)
- golangci-lint
- Kubebuilder Prerequisites (go, docker, kubectl, kubebuilder, controller-gen)
- helm
Once you have installed the above requirements, run the following commands:
- start minikube with containerd engine
make minikube-start
- deploy cert-manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.0/cert-manager.yaml
- build the new image of the controller with your local files
make minikube-build
- deploy the CRD and the controller on the minikube cluster
make install
To deploy a new version of your local controller code when a version is already deployed, run:
make minikube-buildmake installmake restart
To deploy a new version of the CRD by modifying your local api/v1beta1/disruption_types.go (or a particular Subspec by modifying api/v1beta1/disruption_types.go), run:
make installmake restart
The samples contains sample data which can be used to test your changes.
demo.yaml contains testing resources you can apply directly to your cluster in whatever namespace you choose (chaos-demo by default) by running:
kubectl apply -f examples/demo.yaml
To see whether curls are succeeding, by using kubectl to tail the pod's logs, run:
kubectl -n chaos-demo logs -f <curl pod> curl
Once you define your test manifest, run:
kubectl apply -f examples/<manifest>.yaml
To remove the disruption, run:
kubectl delete -f examples/<manifest>.yaml
See development guide for more robust documentation and tips!
make generate: generate boilerplate code.make install: install CRDs and controller into a clustermake manifests: generate manifests e.g. CRD, RBAC etc.make uninstall: uninstall CRDs and controller from a clustermake restart: restart the controller
make minikube-build: build both images and load them into minikubemake minikube-build-injector: build the injector image and load it into minikubemake minikube-build-manager: build the manager image and load it into minikube
make injector: build injector binarymake manager: build manager binarymake minikube-start: start minikube with our ISO and containerd runtime
make fmt: run go fmt against the codebase.make header-check: check all files if they contain the correct header.make license-check: check if all third party modules contain a license and build the license database.make lint: run golangci-lint against codebase.make test: run testsmake vet: run go vet against the codebase.
3rd-party references and licenses are kept in the LICENSE-3rdparty.csv file. This file has been generated by the tasks/3rdparty.py script. If any vendor is updated, added or removed, this file must be updated as well.

