spegel/CONTRIBUTING.md
Philip Laine 10da718e6b
Build binaries as part of the release process
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2025-04-26 10:32:06 +02:00

2.0 KiB

Contributing

Thank you for considering contributing to Spegel, hopefully this document will make this process easier.

Running tests

The following tools are required to run the tests properly.

Run the linter and the unit tests to quickly validate changes.

make lint test

Run the e2e tests which take a bit more time.

make test-e2e

There are e2e tests for the different CNIs iptables, iptables-v6, and ipvs.

make test-e2e E2E_CNI=ipvs

Building

Build the Docker image locally.

make build-image

It is possible to specify a different image name and tag.

make build-image IMG=example.com/spegel TAG=feature

Local debugging

Run the dev-deploy recipe which will create a Kind cluster with the proper configuration and deploy Spegel into it. If you run this command a second time the cluster will be kept but Spegel will be updated.

make dev-deploy

After the command has run you can get a kubeconfig file to access the cluster and do any debugging.

kind get kubeconfig --name spegel-dev > kubeconfig
export KUBECOONFIG=$(pwd)/kubeconfig
kubectl -n spegel get pods

Generate Helm documentation

Changes to the Helm chart values will require the documentation to be regenerated.

make helm-docs

Acceptance policy

Pull requests need to fulfill the following requirements to be accepted.

  • New code has tests where applicable.
  • The change has been added to the changelog.
  • Documentation has been generated if applicable.
  • The unit tests pass.
  • Linter does not report any errors.
  • All end to end tests pass.