cert-manager/make
Ashley Davis ba415c2df3
add missing target for $(BINDIR)
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-07-11 15:41:45 +01:00
..
config update kyverno version and policy 2022-07-06 10:11:37 -07:00
base_images.mk bump base images to latest available 2022-07-01 12:50:21 +01:00
ci.mk move legacy targets to legacy.mk 2022-06-30 22:35:45 +01:00
cluster.sh add todo warning about using FULL images 2022-06-21 16:34:31 +01:00
cmctl.mk make: cmctl and kubectl-cert_manager were using two -ldflags 2022-07-11 10:18:30 +01:00
containers.mk change name of bin dir to _bin by default and make it a variable 2022-06-21 16:34:26 +01:00
e2e-setup.mk update kyverno version and policy 2022-07-06 10:11:37 -07:00
e2e.sh change name of bin dir to _bin by default and make it a variable 2022-06-21 16:34:26 +01:00
git.mk add make-based upgrade test 2022-06-30 22:35:39 +01:00
help.mk
kind_images.sh Bumps kind to 0.14, use upstream kube 1.24 image 2022-06-09 16:53:20 +01:00
legacy.mk move legacy targets to legacy.mk 2022-06-30 22:35:45 +01:00
licenses.mk add make verifier / updater for LICENSES 2022-06-28 09:27:54 +01:00
manifests.mk change name of bin dir to _bin by default and make it a variable 2022-06-21 16:34:26 +01:00
README.md change name of bin dir to _bin by default and make it a variable 2022-06-21 16:34:26 +01:00
release.mk move commented out SHASUM generation to bottom of file 2022-06-21 16:34:30 +01:00
server.mk make: cmctl and kubectl-cert_manager were using two -ldflags 2022-07-11 10:18:30 +01:00
test.mk add make-based upgrade test 2022-06-30 22:35:39 +01:00
tools.mk add missing target for $(BINDIR) 2022-07-11 15:41:45 +01:00
util.mk change name of bin dir to _bin by default and make it a variable 2022-06-21 16:34:26 +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 $(BINDIR)/tools with the command:

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

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

export PATH="$PWD/$(BINDIR)/tools:$PATH"

Tip: this change of PATH won't persist between shell sessions. To get this command executed automatically when you enter the cert-manager folder, put this command in an .envrc file in the cert-manager folder and install direnv.

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 -j8 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 -j8 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]