cert-manager-configs
A Helm chart for installing customizations to the cert-manager deployment
About this chart
cert-manager-configs for Openshift
Helm Templates Approach
This helm chart is meant to provide auto-renewing Let's Encrypt on your api and *.apps endpoints on Openshift. **This requires ClusterAdmin privileges and expects you to install Cert-Manager prior to this chart ** to an OCP 4.x cluster as you will be installing CRDs and touching critical networking pieces. You will also need to be able control your DNS to create the ACME challenges if using the DNS01 ACME Challenge.
It is recommended that you do not enable the cluster.apiServer and cluster.ingressController resources until you have successfully installed cert-manager and configured your issuers to generate valid certs.
Install cert-manager and CRDs
Install cert-manager following the installation instructions for Helm v3:
oc new-project cert-manager
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--version v1.9.0 \
--set installCRDs=true \
--set 'extraArgs={--dns01-recursive-nameservers=8.8.8.8:53\,1.1.1.1:53}'
Note the dns01-recursive-nameservers option above is required in most cases for Route53. By default, cert-manager will check dns with /etc/resolv.conf before creating a CertificateRequest, which is undesirable if your node is not pointed to public DNS nameservers. The dns01-recursive-nameservers is only applicable if you want to use DNS01 ACME Challenge, if you want to utilize HTTP01 you will need to use acme-http01-solver-nameservers parameter instead.
Install ClusterIssuer/Issuer and Certificates
Once cert-manager is up and running, use helm to install to install your issuers, create certificates, and point your APIServer and IngressController to the automatically renewable certificates:
While the cert-manager install can be done with mostly default values, these configs require custom values, including DNS secrets in values.yaml before you can apply the configs.
helm template cert-manager-configs -f charts/cert-manager-configs/values.yaml ./charts/cert-manager-configs | oc apply -f -
Configuration
See comments in values.yaml for more details on configuration
| Parameter | Description | Default |
|---|---|---|
namespace | Project name to install cert-manager | cert-manager |
issuer.solver | Configure a solver (ACME Challenge) type for an Issuer or ClusterIssuer | DNS01 |
issuer.provider | Configure an Issuer or ClusterIssuer for cert-manager, only needed for DNS01 solver | route53 |
issuer.dns.enabled | Enable DNS provider | true |
issuer.acme.emailAddress | Email address for ACME account | [email protected] |
issuer.acme.selectorZones | Limit DNS watch zones | ["subdomain.example.com] |
issuer.acme.issuerKind | Issuer or ClusterIssuer | ClusterIssuer |
aws.accessKeyId | Configure AWS Access Key Id | '' |
aws.secretAccessKey | Configure AWS Secret Access Key | '' |
aws.region | Configure AWS Region | us-east-1 |
rfc2136.dnsNameServer | DNS server address | '' |
rfc2136.tsigKeyAlgorithm | TSIG Key Algorithm | hmac256 |
rfc2136.tsigKeyName | Key name used with dnssec-keygen | '' |
certificates.apiServer.name | Configure APIServer certficate secret name | api-letsencrypt-cert |
certificates.apiServer.namespace | Configure APIServer certficate secret namespace | openshift-config |
certificates.apiServer.issuerRef | Select APIServer issuer | letsencrypt-staging |
certificates.apiServer.issuerKind | Select APIServer issuer kind | ClusterIssuer |
certificates.apiServer.dnsNames | Configure APIServer DNS names | ["api.example.com"] |
certificates.ingressController.name | Configure IngressController certficate secret name | ingress-letsencrypt-cert |
certificates.ingressController.namespace | Configure IngressController certficate secret namespace | openshift-config |
certificates.ingressController.issuerRef | Select IngressController issuer kind | letsencrypt-staging |
certificates.ingressController.issuerKind | Select IngressController issuer kind | ClusterIssuer |
certificates.ingressController.dnsNames | Configure IngressController DNS names | ["api.example.com"] |
cluster.apiServer.enabled | Enable APIServer ACME certificates | false |
cluster.apiServer.name | Configure apiServer endpoint | api.example.com |
cluster.apiServer.tlsSecret | APIServer secret name created in certificates.apiServer.name | api-letsencrypt-cert |
cluster.ingressController.enabled | Enable ACME wildcard IngressController certificates | false |
cluster.caBundle | Get latest Let's Encrypt CA and drop it here | '' |
Deploy cert-manager-configs 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-configs 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcert-manager-configs is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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