We strive to 80% or higher unit test coverage. If your code is not well tested, your PR will not be merged.
Run tests via:
make test
For a high-level overview of the architecture, see docs/architecture.md.
Prereq: Write access to the repo.
Releases should follow https://0ver.org.
- Create and push a git tag on branch
main
.git tag v0.X.X && git push --tags
- Triggers CICD action to build and push docker image to ghcr.
- When complete, view the docker image in packages.
The Makefile is your friend. Run make help
to see all available targets.
Run these commands to setup your environment:
make tools
You’ll need a Kubernetes cluster to run against. You can use KIND to get a local cluster for testing, or run against a remote cluster.
Note: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info
shows).
Prereq: Write access to the repo.
- Authenticate with docker to push images to repository.
Create a PAT on Github with package read and write permissions.
printenv GH_PAT | docker login ghcr.io -u <your GH username> --password-stdin
- Deploy a prerelease.
Warning: Make sure you're kube context is set appropriately, so you don't install in the wrong cluster!
make deploy-prerelease
To delete the CRDs from the cluster:
make uninstall
UnDeploy the controller to the cluster:
make undeploy
This project aims to follow the Kubernetes Operator pattern
It uses Controllers which provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster
- Install the CRDs into the cluster:
make install
- Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
make run
NOTE: You can also run this in one step by running: make install run
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
make manifests
More information can be found via the Kubebuilder Documentation