cert-manager/make
Maël Valais 5b3b8a83ef make: e2e: add CGO_ENABLED=0 to make/e2e.sh
This is because we are running these tests in a non-libc container
(alpine) which means we can't use CGO.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-03-14 17:18:51 +01:00
..
config make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
base_images.mk bump base images 2022-01-04 14:49:15 +00:00
ci.mk make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
cluster.sh verify-errexit: add set -e to pass CI 2022-03-13 12:32:08 +01:00
cmctl.mk make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
containers.mk make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
e2e-setup.mk make: e2e-setup now skips bind and sampleexternalissuer on arm64 2022-03-14 15:34:48 +01:00
e2e.sh make: e2e: add CGO_ENABLED=0 to make/e2e.sh 2022-03-14 17:18:51 +01:00
git.mk make: bin/release-version needs to be rebuilt every time 2022-02-25 17:30:48 +01:00
help.mk make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
licenses.mk rename all uses of github.com/jetstack/cert-manager 2022-02-02 09:08:31 +00:00
manifests.mk make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
README.md make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
release.mk make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
server.mk make: add the targets 'e2e-setup-kind', 'e2e-setup-kind', and 'e2e' 2022-03-13 12:32:08 +01:00
test.mk make: test-ci: xargs --max-procs doesn't exist in the busybox 2022-03-14 16:47:43 +01:00
tools.mk make: remove 'how to install system tools' instructions such as go or jq 2022-03-13 12:32:08 +01:00

Development tooling

This directory contains tools and scripts used to create development and testing environments for cert-manager.

Tool dependencies

The scripts in this directory commonly require additional tooling, such as access to kubectl, helm, kind and a bunch of other things.

If you already have these tools available on your host system, the scripts should just work, so long as the versions you have installed are roughly compatible.

If you are running into issues with your host-installed tools, you can have them downloaded in bin/tools with the command:

# With "-j", the tools are downloaded in parallel.
make -j tools

To setup your shell to use the tools, run the following from the root of the repository:

export PATH="$PWD/bin/tools:$PATH"

Common usages

This section describes common usage patterns for development and testing.

Installing a development build of cert-manager

Once you have a kind cluster running, you can install a development version of cert-manager by running:

make -j e2e-setup-certmanager

This will create a kind cluster, build, load and install cert-manager from source into your kind development cluster.

Further invocations of this command will rebuild and upgrade the installed version of cert-manager, making it possible to iteratively work on the codebase and test changes.

Running end-to-end tests

Before running the end-to-end tests, you must install some additional components used during the tests into your kind cluster.

Run the following to setup cert-manager, Pebble, ingress-nginx, the sample DNS01 webhook and all the other components required for the end-to-end tests:

make -j e2e-setup

You only need to run this command once for the lifetime of your test cluster.

Finally, run the end-to-test tests using:

make e2e

You can run this command multiple times against the same cluster without adverse effects.

A common use-case is to run a single test case from the end-to-end tests. This is explained in the --help:

./make/e2e.sh --help

Deleting the test cluster

Once you have finished with your testing environment, or if you have encountered a strange state you cannot recover from, you can tear down the testing environment by using kind directly:

kind delete cluster [--name=$KIND_CLUSTER_NAME]