Skip to content

hetzner/cert-manager-webhook-hetzner

Repository files navigation

cert-manager-webhook-hetzner

Maturity codecov

This webhook creates the necessary DNS entries in the Hetzner DNS API to solve a DNS01 challenge for a cert-manager Issuer of the ACME type.

Docs

For more information, see the documentation.

Development

Start a development environment

  1. Configure a HETZNER_TOKEN in your shell session.
  2. Deploy the development cluster.
make -C dev up
  1. Load the generated configuration to access the development cluster:
source dev/files/env.sh
  1. Start developing cert-manager-webhook-hetzner in the development cluster:
skaffold dev
  1. Test your deployment by placing your zone name into commonName and dnsName of dev/example-cert.yaml:
kubectl apply -f dev/example-cert.yaml
  1. Wait for your certificate to be issued. This can take up to two minutes:
kubectl -n cert-manager get certificates example-cert -w

⚠️ Do not forget to clean up the development cluster once are finished:

make -C dev down

Run the unit tests

go test ./internal/... -v

Run the cert-manager conformance test suite

All DNS providers must run the DNS01 provider conformance testing suite, else they will have undetermined behaviour when used with cert-manager.

You can run the test suite by:

HETZNER_TOKEN="your-secret-token" make e2e-setup
make e2e