If you submit a pull request, please keep the following guidelines in mind:
- Code should be
go fmt
compliant. - Types, structs and funcs should be documented.
- Tests pass.
Since this webhook depends on cert-manager, certificates and other Kubernetes resources, it's a lot easier to develop it directly in Kubernetes with okteto
.
Clone the repo:
git clone https://github.com/okteto/cert-manager-webhook-civo
Deploy the latest version of webhook via Helm 3 in your cluster:
helm install dev charts/cert-manager-webhook-civo
Deploy your development environment with okteto
:
okteto up
Build the latest version:
okteto> make build
Start the webhook process:
okteto> make start
Okteto will automatically synchronize your changes, so rebuilding and restarting the process is all you need to do when validating a change.
When working on code in this repository, tests can be run via:
make test
Easiest way is to create and delete a certificate from the command line. The samples directory has a certificate and an issuer to help you get started.