gotenberg

by Ad Noctem Collective

Helm chartv0.2.2App 8.7.0MIT

Gotenberg is a Docker-powered stateless API for PDF files.

About this chart

FMJ Studios - Gotenberg Helm Chart

Gotenberg is an open-source, Docker-powered stateless API for PDF files. It provides a developer friendly API to interact with powerful tools like Chromium and LibreOffice for converting numerous document formats (HTML, Markdown, Word, Excel, etc.) into PDF files and more. It delivers all of these features within a single Docker image available on Docker Hub.

Head to the Gotenberg Homepage for in-depth documentation and configuration guides.

✨ TL;DR

Helm Repository Installation

helm repo add fmjstudios https://fmjstudios.github.io/helm
helm install gotenberg fmjstudios/gotenberg --version X.Y.Z

OCI Installation

helm install oci://ghcr.io/fmjstudios/helm/gotenberg:X.Y.Z

Introduction

This chart bootstraps a Gotenberg Deployment on a Kubernetes cluster using the Helm package manager. For cluster networking a Service and Ingress manifest is also created, whereas the Ingress needs to be explicitly enabled. Lastly the chart configures a PodDisruptionBudget and HorizontalPodAutoscaler if enabled. RBAC manifests are enabled by default.

The chart supports the configuration of all Gotenberg CLI options via the gotenberg key in Helm's values and makes use of the official Docker Hub container image, although this is configurable via the Image Parameters.

Parameters

Image parameters

NameDescriptionValue
image.registryThe Docker registry to pull the image fromdocker.io
image.repositoryThe registry repository to pull the image fromgotenberg/gotenberg
image.tagThe image tag to pull8.7.0
image.digestThe image digest to pull""
image.pullPolicyThe Kubernetes image pull policyIfNotPresent
image.pullSecretsA list of secrets to use for pulling images from private registries[]

Name overrides

NameDescriptionValue
nameOverrideString to partially override gotenberg.fullname""
fullnameOverrideString to fully override gotenberg.fullname""

Gotenberg Configuration parameters

NameDescriptionValue
gotenberg.api.portThe port the API should listen on3000
gotenberg.api.tlsCertFileDisable health check logging""
gotenberg.api.tlsKeyFileDisable health check logging""
gotenberg.api.startTimeoutSet the time limit for the API to start30s
gotenberg.api.timeoutSet the time limit for requests30s
gotenberg.api.rootPathSet the root path of the API"/"
gotenberg.api.traceHeaderSet the header name to use for identifying requests""
gotenberg.api.disableHealthCheckLoggingDisable health check loggingfalse
gotenberg.basicAuth.enabledEnable basic authenticationfalse
gotenberg.basicAuth.usernameSet a username for HTTP Basic Auth""
gotenberg.basicAuth.passwordSet a password for HTTP Basic Auth""
gotenberg.basicAuth.existingSecretThe name of an existing basic-auth secret""
gotenberg.chromium.restartAfterNumber of conversions after which Chromium will auto-restart0
gotenberg.chromium.maxQueueSizeMaximum request queue size for Chromium0
gotenberg.chromium.autoStartAutomatically launch Chromium upon initialization if set to truefalse
gotenberg.chromium.startTimeoutMaximum duration to wait for Chromium to start or restart20s
gotenberg.chromium.allowFileAccessFromFilesAllow file:// URIs to read other file:// URIsfalse
gotenberg.chromium.allowInsecureLocalhostIgnore TLS/SSL errors on localhostfalse
gotenberg.chromium.allowListSet the allowed URLs for Chromium using a regular expression - defaults to 'All'""
gotenberg.chromium.denyListSet the denied URLs for Chromium using a regular expression""
gotenberg.chromium.ignoreCertificateErrorsIgnore the certificate errorsfalse
gotenberg.chromium.disableWebSecurityDon't enforce the same-origin policyfalse
gotenberg.chromium.incognitoStart Chromium with incognito modefalse
gotenberg.chromium.hostResolverRulesSet custom mappings to the host resolver""
gotenberg.chromium.proxyServerSet the outbound proxy server; this switch only affects HTTP and HTTPS requests""
gotenberg.chromium.clearCacheClear Chromium cache between each conversionfalse
gotenberg.chromium.clearCookiesClear Chromium cookies between each conversionfalse
gotenberg.chromium.disableJavaScriptDisable JavaScriptfalse
gotenberg.chromium.disableRoutesDisable the routesfalse
gotenberg.libreOffice.restartAfterNumber of conversions after which LibreOffice will automatically restart10
gotenberg.libreOffice.maxQueueSizeMaximum request queue size for LibreOffice0
gotenberg.libreOffice.autoStartAutomatically launch LibreOffice upon initialization if set to truefalse
gotenberg.libreOffice.startTimeoutMaximum duration to wait for LibreOffice to start or restart20s
gotenberg.libreOffice.disableRoutesDisable the routefalse
gotenberg.pdf.enginesSet the PDF engines and their order - defaults to 'All'""
gotenberg.pdf.disableRoutesDisable the routesfalse
gotenberg.webhook.allowListSet the allowed URLs for the webhook feature using a regular expression""
gotenberg.webhook.denyListSet the denied URLs for the webhook feature using a regular expression""
gotenberg.webhook.errorAllowListSet the allowed URLs in case of an error using a regular expression""
gotenberg.webhook.errorDenyListSet the denied URLs in case of an error using a regular expression""
gotenberg.webhook.maxRetrySet the maximum number of retries4
gotenberg.webhook.retryMinWaitSet the minimum duration to wait before trying to call the webhook again1s
gotenberg.webhook.retryMaxWaitSet the maximum duration to wait before trying to call the webhook again30s
gotenberg.webhook.clientTimeoutSet the time limit for requests to the webhook30s
gotenberg.webhook.disableDisable the webhook featurefalse
gotenberg.prometheus.collectIntervalSet the interval for collecting modules' metrics1s
gotenberg.prometheus.namespaceSet the namespace of modules' metricsgotenberg
gotenberg.prometheus.disableCollectDisable the collect of metricsfalse
gotenberg.prometheus.disableRouteLoggingDisable the route loggingfalse
gotenberg.logging.formatSpecify the format of loggingauto
gotenberg.logging.levelChoose the level of logging detailinfo
gotenberg.logging.fieldsPrefixPrepend a specified prefix to each field in the logs""
gotenberg.shutdown.durationSet the graceful shutdown duration30s

Common Secret parameters

NameDescriptionValue
secret.annotationsCommon annotations for the SMTP, HIBP, Admin and Database secrets{}
secret.labelsCommon extra labels for the SMTP, HIBP, Admin and Database secrets{}

Ingress parameters

NameDescriptionValue
ingress.enabledWhether to enable Ingressfalse
ingress.classNameThe IngressClass to use for the pod's ingress""
ingress.whitelistA comma-separated list of IP addresses to whitelist""
ingress.annotationsAnnotations for the Ingress resource{}
ingress.tlsA list of hostnames and secret names to use for TLS[]
ingress.hostsA list of hosts for the Ingress resource[]

Service parameters

NameDescriptionValue
service.typeThe type of service to createClusterIP
service.portThe port to use on the service80
service.nodePortThe Node port to use on the service30080
service.extraPortsExtra ports to add to the service[]
service.annotationsAnnotations for the service resource{}
service.labelsLabels for the service resource

Deploy gotenberg with OpenTenant

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