Pre-requisites:
- make
- Go compiler
To build the controller use the following command:
make allTo run the unit tests:
make testTo run the controller for development purposes, you can use Tilt.
Please follow the Tilt installation documentation to install the command line tool.
A development Kubernetes cluster is needed to run the controller. You can use k3d to create a local cluster for development purposes.
The tilt-settings.yaml.example acts as a template for the tilt-settings.yaml file that you need to create in the root of this repository.
Copy the example file and edit it to match your environment.
The tilt-settings.yaml file is ignored by git, so you can safely edit it without worrying about committing it by mistake.
The following settings can be configured:
registry: the container registry where the controller image will be pushed. If you don't have a private registry, you can useghcr.ioas long as your cluster has access to it.
Example:
registry: ghcr.io/your-gh-username/runtime-class-managerThe Tiltfile included in this repository will take care of the following:
- Create the
runtime-class-managernamespace and install the controller helm-chart in it. - Inject the development image in the deployment.
- Automatically reload the controller when you make changes to the code.
To run the controller, you just need to run the following command against an empty cluster:
tilt up --streamAll commits in a PR must be GPG-signed and signed-off. A typical command for a commit with a GPG signature and developer sign-off is:
git commit --signoff -S -m "<commit message>"Please follow the instructions for signing commits to set up your GPG key.