cert-manager-webhook-bunny

by aardbol

Helm chartv1.4.3App v1.4.2Apache-2.0Verified publisher

A Helm chart for a cert-manager ACME DNS01 webhook solver for Bunny DNS

About this chart

cert-manager-webhook-bunny

cert-manager webhook implementation for use with Bunny provider for solving ACME DNS-01 challenges.

This fork takes a simpler approach by requiring the Bunny DNS Zone ID to be set manually. This avoids depending on Bunny zone lookup behavior and should be more robust against future Bunny DNS API or response format changes.

The trade-off is that one solver configuration targets one Bunny zone, so with the current implementation only one zone can be handled per certificate solver configuration.

Usage

For the Bunny-specific configuration, you will need to create a Kubernetes Secret containing the API key.

You can do it like this:

kubectl create secret generic bunny-api -n cert-manager --from-literal=api-key=<api-key-from-bunny-dashboard>

You can prepend the command with a space so that it is not saved in your shell history, depending on shell support. Prefer using an external secret manager where possible.

After creating the Secret, configure your Issuer or ClusterIssuer. The example below assumes the Secret is called bunny-api and located in namespace cert-manager.

apiVersion: cert-manager.io/v1
kind: ClusterIssuer # or Issuer
metadata:
  name: letsencrypt-prod-dns
spec:
  acme:
    email: [email protected]
    privateKeySecretRef:
      name: letsencrypt-prod
    server: https://acme-v02.api.letsencrypt.org/directory
    solvers:
      - dns01:
          webhook:
            groupName: bunny.aardbol.dev
            solverName: bunny
            config:
              secretRef: bunny-api
              secretNamespace: cert-manager

The Secret may contain:

  • secretKey: the key in the Secret that contains the Bunny API key, defaults to api-key.

The webhook config must contain:

  • secretRef: the name of the Secret containing the Bunny API key, as created above.

The webhook config may also contain:

  • secretNamespace: the namespace where the Secret is located, defaults to cert-manager.

The groupName must match the Helm chart value used when deploying the webhook.

For more details, please refer to https://cert-manager.io/docs/configuration/acme/dns01/webhook/

Helm installation

Install directly from the GitHub Container Registry (OCI):

helm install cert-manager-webhook-bunny oci://ghcr.io/aardbol/charts/cert-manager-webhook-bunny --version <CHART_VERSION> -n cert-manager

You can also override values explicitly:

helm install cert-manager-webhook-bunny oci://ghcr.io/aardbol/charts/cert-manager-webhook-bunny \
  --version <CHART_VERSION> \
  -n cert-manager \
  --set groupName=bunny.aardbol.dev \
  --set secretAccess.namespace=cert-manager

From that point, the issuer configured above should be able to solve DNS01 challenges using cert-manager-webhook-bunny.

Values

KeyTypeDefaultDescription
groupNamestring"bunny.aardbol.dev"API group used by cert-manager to find this webhook solver
replicaCountint1Number of webhook replicas
certManager.namespacestring"cert-manager"Namespace where cert-manager runs
certManager.serviceAccountNamestring"cert-manager"Service account used by cert-manager
image.repositorystring"ghcr.io/aardbol/cert-manager-webhook-bunny"Container image repository
image.tagstring""Container image tag (defaults to appVersion from Chart.yaml)
image.pullPolicystring"IfNotPresent"Container image pull policy
nameOverridestring""Override the chart name
fullnameOverridestring""Override the full resource names
service.typestring"ClusterIP"Kubernetes service type
service.portint443Kubernetes service port
secretAccess.namespacestring"cert-manager"Namespace where Bunny API secrets are allowed to be read from
secretAccess.nameslist[]List of Secret names the webhook may read (empty = any Secret in namespace)
resourcesobject{}Resource requests and limits
nodeSelectorobject{}Node selector for pod scheduling
tolerationslist[]Tolerations for pod scheduling
affinityobject{}Affinity rules for pod scheduling

Notes

The chart RBAC is scoped to the namespace configured insecretAccess.namespace. If your secretNamespace in the Issuer points to a different namespace, the webhook will not be allowed to read the Secret.

License

Apache 2 License

Deploy cert-manager-webhook-bunny with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cert-manager-webhook-bunny on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcert-manager-webhook-bunny is pinned at v1.4.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply