cert-manager-webhook-inwx

by andibraeu

Helm chartv0.9.1App 0.9.1Verified publisher

A Helm chart cert-manager ACME Webhook for INWX

About this chart

ACME Webhook for INWX

This project provides a cert-manager ACME Webhook for INWX and a corresponding helm chart.

The helm chart is listed at Artifact Hub in repository andibraeu at https://artifacthub.io/packages/helm/andibraeu/cert-manager-webhook-inwx.

Requirements

Configuration

The following table lists the configurable parameters of the cert-manager chart and their default values.

ParameterDescriptionDefault
groupNameGroup name of the API service.cert-manager-webhook-inwx.smueller18.gitlab.com
credentialsSecretRefsNames of secrets where INWX credentials are stored. Used for RBAC to allow reading the secret by the service account name of webhook.['inwx-credentials']
deployment.loglevelNumber for the log level verbosity of webhook deployment2
certManager.namespaceNamespace where cert-manager is deployed to.cert-manager
certManager.serviceAccountNameService account of cert-manager installation.cert-manager
image.repositoryImage repositoryregistry.gitlab.com/smueller18/cert-manager-webhook-inwx
image.tagImage tagv0.6.0
image.pullPolicyImage pull policyIfNotPresent
service.typeAPI service typeClusterIP
service.portAPI service port443
resourcesCPU/memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
affinityNode affinity for pod assignment{}
tolerationsNode tolerations for pod assignment[]

Installation

cert-manager

Follow the instructions using the cert-manager documentation to install it within your cluster.

Webhook

helm repo add andibraeu https://andibraeu.github.io/helmcharts/
helm repo update
helm install --namespace cert-manager cert-manager-webhook-inwx abdibraeu/cert-manager-webhook-inwx

Note: The kubernetes resources used to install the Webhook should be deployed within the same namespace as the cert-manager.

To uninstall the webhook run

helm uninstall --namespace cert-manager cert-manager-webhook-inwx

Issuer

Create a ClusterIssuer or Issuer resource as following:

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-staging
spec:
  acme:
    # The ACME server URL
    server: https://acme-staging-v02.api.letsencrypt.org/directory

    # Email address used for ACME registration
    email: [email protected] # REPLACE THIS WITH YOUR EMAIL!!!

    # Name of a secret used to store the ACME account private key
    privateKeySecretRef:
      name: letsencrypt-staging

    solvers:
      - dns01:
          webhook:
            groupName: cert-manager-webhook-inwx.smueller18.gitlab.com
            solverName: inwx
            config:
              ttl: 300 # default 300
              sandbox: false # default false

              # prefer using secrets!
              # username: USERNAME
              # password: PASSWORD
              # otpKey: OTPKEY

              usernameSecretKeyRef:
                name: inwx-credentials
                key: username
              passwordSecretKeyRef:
                name: inwx-credentials
                key: password
              otpKeySecretKeyRef:
                name: inwx-credentials
                key: otpKey

Credentials

For accessing INWX DNS provider, you need the username and password of the account. You have two choices for the configuration for the credentials, but you can also mix them. When username or password are set, these values are preferred, and the secret will not be used.

If you choose another name for the secret than inwx-credentials, ensure to add to or modify the value of credentialsSecretRefs in values.yaml.

The secret for the example above will look like this:

Without 2FA

apiVersion: v1
kind: Secret
metadata:
  name: inwx-credentials
stringData:
  username: USERNAME
  password: PASSWORD

With 2FA enabled

apiVersion: v1
kind: Secret
metadata:
  name: inwx-credentials
stringData:
  username: USERNAME
  password: PASSWORD
  otpKey: OTPKEY

Create a certificate

Finally you can create certificates, for example:

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: example-cert
  namespace: cert-manager
spec:
  commonName: example.com
  dnsNames:
    - example.com
  issuerRef:
    kind: ClusterIssuer
    name: letsencrypt-staging
  secretName: example-cert

Deploy cert-manager-webhook-inwx 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-inwx 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-inwx is pinned at v0.9.1 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