cert-manager-setup

by joaquinito2051

Helm chartv0.2.3App 1.0.1

Install cert-manager and optionally add a ClusterIssuer

About this chart

cert-manager-setup

cert-manager-setup installs cert-manager which is a Kubernetes addon to automate the management and issuance of TLS certificates from various issuing sources.

cert-manager will ensure certificates are valid and up to date periodically, and attempt to renew certificates at an appropriate time before expiry.

cert-manager-setup deploys the cert-manager

In addition to installing cert-manager, cert-manager-setup provides the capability to specify a ClusterIssuer in the values.yaml file which will be applied directly after the cert-manager installation has completed. In order for this to happen, cert-manager-setup sets up an Issuer in the cert-manager namespace. It then creates an intermediate certificate from the secret kubernetes-root-ca which must already contain ideally the Kubernetes root CA. The ClusterIssuer then uses the intermediate certificate derived from the Kubernetes root CA.

You can also create Issuer and Certificate in other namespaces, just define namespace within the values.

issuers:
  - name: my-issuer
    namespace: kube-system
    ...

certificates:
 - name: my-certificate
   namespace: kube-system
   ...

Supported values format

clusterissuers:
  - name: clusterissuer-name
    spec:
      ca:
        secretName: clusterissuer-secret

In the given example we create a ClusterIssuer named clusterissuer-name with the ca type. The ca type expects a secret that contains the Certificate Authority (CA) to be used by this ClusterIssuer. The spec follows the original cert-manager spec.

See reference documentation for all available definitions from cert-manager. Consider a look into the API documentation

Notes

In order to submit the ClusterIssuer post installation, cert-manager-setup runs a post-install Job hook. In case that the hook fails the Job will not be cleaned up by Helm. This behavior is intended to ease debugging.

Deploy cert-manager-setup 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-setup 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-setup is pinned at v0.2.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