letsencrypt-setup

by joaquinito2051

Helm chartv2.2.2App v0.11.1

Setup clusterIssuers for cert-manager

About this chart

Chart - letsencrypt-setup

Installs the necessary additional items that the cert-manager chart lacks.

Upgrading to 2.0.0 Chart Version

There are breaking changes with 2.0.0 chart version in that it absolutely requires a version of cert-manager v0.11.0 or higher to be running in the cluster.

Please follow upgrade instructions located here

Configuration

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

ParameterDescriptionDefaultRequired
clusterIssuers.selfsigned.clusterIssuerNameName of the selfsigned clusterIssuerRelease.Name-self-signedno
clusterIssuers.selfsigned.enabledWhether or not the selfsigned ClusterIssuer is installedfalseyes
clusterIssuers.selfsigned.issuerUrlThe URL to use for ACMEhttps://acme-staging-v02.api.letsencrypt.org/directoryyes
clusterIssuers.selfsigned.emailThe email used for ACME registration""yes
clusterIssuers.selfsigned.solvers.http.enabledEnables http01 validation on selfsigned issuerfalseyes
clusterIssuers.selfsigned.solvers.http.ingressClassUse http01 solver with a specific ingress class""no
clusterIssuers.selfsigned.solvers.http.ingressNameUse this solver with a specific ingress name""no
clusterIssuers.selfsigned.solvers.http.selectorselector for http01 solver{}no
clusterIssuers.selfsigned.solvers.dnsList of DNS solvers and optional selectors for each. See below for configuration[]no
clusterIssuers.primary.clusterIssuerNameName of the primary clusterIssuerRelease.Name-primary-validno
clusterIssuers.primary.enabledWhether or not the primary ClusterIssuer is installedfalseyes
clusterIssuers.primary.issuerUrlThe URL to use for ACMEhttps://acme-v02.api.letsencrypt.org/directoryyes
clusterIssuers.primary.emailThe email used for ACME registration[email protected]yes
clusterIssuers.primary.solvers.http.enabledEnables http01 validation on primary issuerfalseyes
clusterIssuers.primary.solvers.http.ingressClassUse http01 solver with a specific ingress classnginxno
clusterIssuers.primary.solvers.http.ingressNameUse this solver with a specific ingress name""no
clusterIssuers.primary.solvers.http.selectorselector for http01 solver{}no
clusterIssuers.primary.solvers.dnsList of DNS solvers and optional selectors for each. See below for configuration[]no

DNS Solvers Configuration

Route53

ParameterDescription
accessKeyIDFor use with specific IAM account credentials, not necessary if nodes have IAM role that gives access to route53
roleRole ARN to assume. Handy for cross-account route53 record management
hostedZoneIDRoute53 hosted zone ID; recommended if using cross-account IAM role assumption
regionRequired if using accessKeyID for authentication
secretNameRequired if using accessKeyID, name of kubernetes secret that contains the IAM secret access key correlating to the accessKeyID
secretKeyRequired if using accessKeyID, key within a kubernetes secret data block that holds the IAM secret access key
typeDefines the type of DNS solver, should be set to route53

Cloud DNS

ParameterDescription
projectName of the project in Google Cloud where Cloud DNS is used
secretNameoptional kubernetes secret name in same namespace
secretKeykey in the kubernetes secret with the service account creds
typeDefines the type of DNS solver, should be set to clouddns

Cloudflare

ParameterDescription
emailEmail associated with the Cloudflare account
secretNameName of kubernetes secret that contains the secret access key
secretKeyKey within a kubernetes secret data block that holds the secret access key
typeDefines the type of DNS solver, should be set to cloudflare

AzureDNS

ParameterDescription
clientIdThe AAD Service Principal Application ID
clientSecretName of kubernetes secret that contains the secret Service Principal password
clientSecretKeyKey within a kubernetes secret data block that holds the Service Principal password
subscriptionIdAzure subscription where the DNS zone lives
tenantIdAzure tenant where the subscription lives
resourceGroupNameResource group where the DNS zone lives
hostedZoneNameDNS Zone name (ex: example.com)
environmentPublic or Private zone (default AzurePublicCloud)
typeDefines the type of solver, should be set to azuredns

Selector Settings

Selectors allow you to specify multiple challenge solvers and force certain constraints on when specific solvers should be used. The most common will probably be dnsZones, but you can also use dnsNames to force a set of specific entries to be solved a certain way. The third way to specify an ingress to use a specific solver is through labels using the matchLabels setting which accepts key/value objects to match labels against. An empty selector will attempt to be used for any and all ingress challenges.

ParameterValue TypeDescription
matchLabelsmapLabels applied to a given ingress that should use this solver
dnsNameslistSpecific Ingress DNS entries that should use this solver
dnsZoneslistEntire DNS domains that should only use this solver

In the example configuration below, we use route53 DNS to solve for foo.com and Google Cloud DNS for bar.com:

clusterIssuers:
  primary:
    enabled: true
    email: [email protected]
    solvers:
      dns:
      - type: route53
        hostedZoneID: MYHOSTEDZONE
        selector:
          dnsZones:
          - foo.com
      - type: clouddns
        project: test-project
        selector:
          dnsZones:
          - bar.com

Deploy letsencrypt-setup with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has letsencrypt-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 chartletsencrypt-setup is pinned at v2.2.2 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