cert-manager

by tjungbauer

Helm chartv2.0.9Apache-2.0Verified publisher

Install and configure the Cert-Manager

About this chart

cert-manager

Description

Install and configure the Cert-Manager

This Helm Chart installs and configures the Cert-Manager Operator. It can patch the ClusterManager resource in order to override arguments (for example the list of recursive nameservers) and to configure ClusterIssuer or Issuers. Moreover, it is possible to order a certificate by creating a Certificate resource.

Currently, the built-in in-tree issuers are supported: https://cert-manager.io/docs/configuration/selfsigned/

. selfSigned . ACME . CA . Venafi . Vault

Dependencies

This chart has the following dependencies:

RepositoryNameVersion
https://charts.stderr.at/tpl~1.0.31

It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops (see folder cluster/management-cluster/cert-manager)

Maintainers

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/cert-manager

Values

KeyTypeDefaultDescription
certManager.enable_patchboolfalseEnable pathing of the certManager resource, for the ACME provider. This is required, when the recusrive nameserver shall be changed. For example, when private and public define-domains in AWS Route 53 are used, then the DNS server must be set. Verify the documentation at: https://docs.openshift.com/container-platform/4.15/security/cert_manager_operator/cert-manager-operator-issuer-acme.html The resource itself it created automatically and is therefor patched.
certManager.logLevelstringNormalLoglevel of the cert-manager operator. Possible values are: Debug, Trace, TraceAll, Normal
certManager.operatorLogLevelstringNormaloperatorLogLevel of the cert-manager operator. Possible values are: Debug, Trace, TraceAll, Normal
certManager.overrideArgsobject{"args":[],"enabled":false}List of arguments that should be overwritten.
certManager.overrideArgs.argslist[]List of arguments that should be overwritten.
certManager.unsupportedConfigOverridesobject{}UNSUPPORTED Config Overrides. For example to disable the automatic certificate approver, because you might want to use policy approver to limit which certificates can be created.
certificates.certificate[0]object{"dnsNames":["example.com","www.example.com"],"duration":"2160h0m0s","emailAddresses":["[email protected]"],"enabled":false,"ipAddresses":["192.168.0.5"],"isCA":false,"issuerRef":{"group":"cert-manager.io","kind":"Issuer","name":"ca-issuer"},"name":"example-cert","namespace":"example","privateKey":{"algorithm":"RSA","encoding":"PKCS1","rotationPolicy":"Always","size":2048},"renewBefore":"360h0m0s","secretName":"example-cert-tls","secretTemplate":{"annotations":{"my-secret-annotation-1":"foo","my-secret-annotation-2":"bar"},"labels":{"my-secret-label":"foo"}},"subject":{"countries":["Country"],"localities":["Cities"],"organizationalUnits":["OrganizationalUnit"],"organizations":["Organization"],"postalCodes":["PostalCode"],"provinces":["State"],"serialNumber":"SerialNumber","streetAddresses":["StreetAddress"]},"syncwave":"0","uris":["spiffe://cluster.local/ns/sandbox/sa/example"],"usages":["server auth","client auth"]}Name of the certificate resource. This is not the dnsName of commonName.
certificates.certificate[0].dnsNameslist["example.com","www.example.com"]Requested DNS subject alternative names.
certificates.certificate[0].durationstring2160h0m0s (90d)The duration of the certificated (X.509 certificate's duration) Some issuers might be configured to only issue certificates with a set duration Minimum value for spec.duration is 1 hour It is required that spec.duration > spec.renewBefore Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration
certificates.certificate[0].emailAddresseslist["[email protected]"]Requested email subject alternative names.
certificates.certificate[0].enabledboolfalseEnable ordering of this certificate
certificates.certificate[0].ipAddresseslist["192.168.0.5"]Requested IP address subject alternative names.
certificates.certificate[0].isCAboolfalseRequested basic constraints isCA value. If true, this will automatically add the cert sign usage to the list of requested usages.
certificates.certificate[0].issuerRef.groupstringUNSET (cert-manager.io)Optional parameter that is only required when external issuers are used.
certificates.certificate[0].issuerRef.kindstringIssuerThe reference can either be ClusterIssuers or Issuer
certificates.certificate[0].issuerRef.namestring"ca-issuer"Name of the Issuer that shall be used.
certificates.certificate[0].namespacestring"example"Namespace for this certificate
certificates.certificate[0].privateKey.algorithmstringRSAAlgorithm of the private key. Possible values (with default sizes if size is not provided): RSA (2048), ECDSA (256) or Ed25519 (ignored)
certificates.certificate[0].privateKey.encodingstringPKSC1The private key cryptography standards (PKCS) encoding for this certificate's private key to be encoded in. Allowed values are PKCS1 an dPKCS8.
certificates.certificate[0].privateKey.rotationPolicystringAlwaysRotationPolicy controls how private keys should be regenerated when a re-issuance is being processed. Possible values are 'Never' (the private key will only be generated if it does not already exist) or 'Always' (the private key will aleays be generated whenever a re-issuance occurs.
certificates.certificate[0].privateKey.sizeint2048Size is the key bit size of the corresponding private key for this certificate. If algorithm is set to RSA, valid values are 2048, 4096 or 8192, and will default to 2048 if not specified. If algorithm is set to ECDSA, valid values are 256, 384 or 521, and will default to 256 if not specified. If algorithm is set to Ed25519, Size is ignored. No other values are allowed.
certificates.certificate[0].renewBeforestring1/3 of duration if not setHow long before the currently issued certificate's expiry cert-manager should renew the certificate. For example, if a certificate is valid for 60 minutes, and renewBefore=10m, cert-manager will begin to attempt to renew the certificate 50 minutes after it was issued If unset, this defaults to 1/3 of the issued certificate's lifetime. Minimum accepted value is 5 minutes. Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration
certificates.certificate[0].secretNamestring"example-cert-tls"Name of the Secret resource that will be created and managed by the Certificate. It will be populated with a private key and certificate, signed by the denoted issuer.
certificates.certificate[0].secretTemplateobjectN/AsecretTemplate is optional. If set, these annotations and labels will be copied to the Secret created by this Certificate.
certificates.certificate[0].subjectobjectN/ARequested set of X509 certificate subject attributes. More info: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 Might be replaced in the future by literalSubject
certificates.certificate[0].subject.countrieslistN/ACountries to be used on the Certificate.
certificates.certificate[0].subject.localitieslistN/ACities to be used on the Certificate.
certificates.certificate[0].subject.organizationalUnitslistN/AOrganizational Units to be used on the Certificate.
certificates.certificate[0].subject.organizationslistN/AOrganizations to be used on the Certificate.
certificates.certificate[0].subject.postalCodeslistN/APostal Codes to be used on the Certificate.
certificates.certificate[0].subject.provinceslistN/AStates/Provinces to be used on the Certificate.
certificates.certificate[0].subject.serialNumberstringN/ASerial number to be used on the Certificate.
certificates.certificate[0].subject.streetAddresseslistN/AStreet addresses to be used on the Certificate.
certificates.certificate[0].syncwavestring1Syncwave when the certificate shall be ordered.
certificates.certificate[0].urislist["spiffe://cluster.local/ns/sandbox/sa/example"]Requested URI subject alternative names.
certificates.certificate[0].usageslist["server auth","client auth"]Set usages for the certificate full list https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.KeyUsage default if not set, cert manager will set: digital signature, key encipherment, and server auth
certificates.enabledboolfalseEnable ordering of certificates
issuer[0].acmeobject{"email":"[email protected]","privKeyRef":"letsencrypt-account-key","server":"https://acme-v02.api.letsencrypt.org/directory","skipTLSVerify":false,"solvers":[{"dns01":{"route53":{"accessKeyIDSecretRef":{"key":"access-key-id","name":"prod-route53-credentials-secret"},"region":"your-region","secretAccessKeySecretRef":{"key":"secret-access-key","name":"prod-route53-credentials-secret"}}},"selector":{"dnsZones":["define-domains"]}}]}Create ACME issuer. ACME CA servers rely on a challenge to verify that a client owns the domain names that the certificate is being requested for.
issuer[0].acme.emailstring"[email protected]"Email address, Let's Encrypt will use this to contact you about expiring certificates, and issues related to your account.
issuer[0].acme.privKeyRefstringletsencrypt-account-keyName of the Secret resource that will be used to store the ACME account private key.
issuer[0].acme.serverstringhttps://acme-v02.api.letsencrypt.org/directoryURL of PKI server
issuer[0].acme.skipTLSVerifyboolfalseSkip TLS verification.
issuer[0].acme.solverslist[{"dns01":{"route53":{"accessKeyIDSecretRef":{"key":"access-key-id","name":"prod-route53-credentials-secret"},"region":"your-region","secretAccessKeySecretRef":{"key":"secret-access-key","name":"prod-route53-credentials-secret"}}},"selector":{"dnsZones":["define-domains"]}}]add a challenge solver. This coulr be DNS01 or HTTP01 The yaml specification will be used as is Verify the official documentation for detailed information: https://cert-manager.io/docs/configuration/acme/
issuer[0].enabledboolfalseEnable this issuer.
issuer[0].namestring"acme"
issuer[0].syncwaveint20Syncwave to create this issuer
issuer[0].typestring"ClusterIssuer"Type can be either ClusterIssuer or Issuer
issuer[1].enabledboolfalseEnable this issuer.
issuer[1].namestring"selfsigned"
issuer[1].selfSignedbooltrueCreate a selfSigned issuer. The SelfSigned issuer doesn't represent a certificate authority as such, but instead denotes that certificates will "sign themselves" using a given private key. Detailed information can be found at: https://cert-manager.io/docs/configuration/selfsigned/
issuer[1].typestring"ClusterIssuer"Type can be either ClusterIssuer or Issuer
issuer[2].caobject{"secretName":"ca-key-pair"}Create CA issuer, CA issuers are generally either for trying cert-manager out or else for advanced users with a good idea of how to run a PKI. Detailed information can be found at: https://cert-manager.io/docs/configuration/ca/
issuer[2].enabledboolfalseEnable this issuer.
issuer[2].namestring"ca"
issuer[2].typestring"ClusterIssuer"Type can be either ClusterIssuer or Issuer
issuer[3].enabledboolfalseEnable this issuer.
issuer[3].namestring"vault"
issuer[3].typestring"ClusterIssuer"Type can be either ClusterIssuer or Issuer
issuer[3].vaultobject{"auth":{"tokenSecretRef":{"key":"token","name":"cert-manager-vault-token"}},"caBundle":"<base64 encoded caBundle PEM file>","path":"pki_int/sign/example-dot-com","server":"https://vault.local"}Enable Vault issuer. The Vault Issuer represents the certificate authority Vault. Detailed information can be found at: https://cert-manager.io/docs/configuration/vault/
issuer[4].enabledboolfalseEnable this issuer.
issuer[4].namestring"venafi"
issuer[4].typestring"ClusterIssuer"Type can be either ClusterIssuer or Issuer
issuer[4].venafiobject{"cloud":{"apiTokenSecretRef":{"key":"apikey","name":"vaas-secret"}},"zone":"My Application\\My CIT"}The Venafi Issuer types allows you to obtain certificates

Deploy cert-manager 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 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 is pinned at v2.0.9 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