libretranslate

by obeone

Helm chartv2.0.2App v1.10.0Verified publisher

Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup.

About this chart

libretranslate

Warning: breaking change in 2.0.0. Upgrading from a chart version older than 2.0.0 will fail unless you delete the Deployment first. See Upgrading for the exact commands.

Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup.

TL;DR

helm repo add obeone https://charts.obeone.cloud
helm repo update
helm install libretranslate obeone/libretranslate

About

LibreTranslate is a free and open source machine translation API powered by Argos Translate. It is fully self-hosted and offline capable: no API keys, no third-party cloud, your text never leaves the cluster. A small web UI ships on top of the REST API for interactive use.

Prerequisites

  • Helm 3
  • A Kubernetes cluster matching the chart's kubeVersion constraint (see Chart.yaml)

Configuration

This chart is built on the bjw-s-labs common library. Most configuration keys (controllers, service, ingress, persistence, ...) follow its schema; see the common library documentation for everything it supports beyond what is spelled out in values.yaml.

Defaults are meant to work out of the box on any cluster. The full list of options lives in values.yaml, is validated by values.schema.json at install time, and is documented in the Values section below. Override it with your own values file:

helm install libretranslate obeone/libretranslate -f my-values.yaml

Upgrading

Warning If you are upgrading from a chart version older than 2.0.0, helm upgrade will fail: the bjw-s common 5.1.0 migration changes the controller selector label from app.kubernetes.io/component to app.kubernetes.io/controller, and selector labels are immutable on a Kubernetes Deployment. Delete the Deployment first, then upgrade:

kubectl delete deployment <release-name>-libretranslate
helm upgrade <release-name> obeone/libretranslate

This is a plain cascading delete, the default for kubectl delete deployment: the pods go down with it, so expect a short outage while the upgrade recreates them. Do not add --cascade=orphan here. It looks like the safe, zero-downtime option, but the new Deployment selects on app.kubernetes.io/controller, a label the old pods never had, so it can never adopt them. The orphaned pods would keep running unmanaged forever alongside the new ones, and since the models share PVC (<release-name>-share) is ReadWriteOnce, the orphaned pod would keep it attached and the new pod would stay stuck Pending on a multi-attach error. PersistentVolumeClaims (including the models share volume) are not affected by the Deployment delete and must not be deleted separately.

Fresh installs are unaffected; this only applies to upgrades from a pre-2.0.0 release.

helm repo update
helm upgrade libretranslate obeone/libretranslate

Each release lists its changes in the Artifact Hub changelog; give it a look before jumping across several chart versions.

Uninstalling

helm uninstall libretranslate

PersistentVolumeClaims created by the chart are kept around: delete them manually if you also want the data gone.

Requirements

Kubernetes: >=1.31.0-0

RepositoryNameVersion
https://bjw-s-labs.github.io/helm-chartscommon5.1.0

Values

KeyTypeDefaultDescription
additionalVolumeMountslist[]Define additional volumeMounts if needed
additionalVolumeslist[]Define additional volumes if needed
affinityobject{}Affinity rules to control pod assignment based on node labels
controllers.main.containers.main.env.LT_API_KEYSstring"1"Set to "1" to enable API key usage for authentication
controllers.main.containers.main.env.LT_UPDATE_MODELSstring"1"Set to "1" to update language models on startup
controllers.main.containers.main.image.pullPolicystring"Always"Image pull policy (Always, IfNotPresent, Never)
controllers.main.containers.main.image.repositorystring"libretranslate/libretranslate"Image repository to pull
controllers.main.containers.main.image.tagstring"v1.10.0"Image tag to pull (use vX.X.X-cuda for GPU builds)
controllers.main.containers.main.probes.liveness.custombooltrue
controllers.main.containers.main.probes.liveness.enabledbooltrue
controllers.main.containers.main.probes.liveness.spec.httpGet.pathstring"/"
controllers.main.containers.main.probes.liveness.spec.httpGet.portstring"http"
controllers.main.containers.main.probes.readiness.custombooltrue
controllers.main.containers.main.probes.readiness.enabledbooltrue
controllers.main.containers.main.probes.readiness.spec.httpGet.pathstring"/"
controllers.main.containers.main.probes.readiness.spec.httpGet.portstring"http"
controllers.main.containers.main.resources.limitsobject{"cpu":"500m","memory":"512Mi"}Resource limits for the main container
controllers.main.containers.main.resources.requestsobject{"cpu":"100m","memory":"128Mi"}Resource requests for the main container
controllers.main.strategystring"Recreate"
defaultPodOptionsobject{"automountServiceAccountToken":false}Pod-wide options applied to every controller in this chart.
defaultPodOptions.automountServiceAccountTokenboolfalseLibreTranslate never talks to the Kubernetes API, so keep the SA token out of the pod.
globalobject{"gpuEnabled":false}Global parameters for the chart Used to configure GPU support and other global settings
global.gpuEnabledboolfalseEnable GPU-specific settings (like CUDA paths and GPU resources)
ingressobject{"main":{"enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"Prefix","service":{"identifier":"main","port":"http"}}]}],"tls":[{"hosts":["chart-example.local"],"secretName":"tls-chart-example-local"}]}}Ingress configuration for external access to the service
ingress.main.enabledboolfalseEnable or disable ingress
ingress.main.tls[0].secretNamestring"tls-chart-example-local"Secret containing TLS certificate for the ingress
nodeSelectorobject{}Node selector for pod assignment
persistenceobject{"api-keys":{"accessMode":"ReadWriteOnce","annotations":{},"enabled":false,"globalMounts":[{"path":"/app/db"}],"size":"10Mi"},"cache":{"enabled":true,"globalMounts":[{"path":"/home/libretranslate/.local/cache"}],"type":"emptyDir"},"db":{"accessMode":"ReadWriteOnce","annotations":{},"enabled":false,"globalMounts":[{"path":"/home/libretranslate/.local/db"}],"size":"1Gi"},"files-translate":{"enabled":true,"globalMounts":[{"path":"/tmp/libretranslate-files-translate"}],"type":"emptyDir"},"share":{"accessMode":"ReadWriteOnce","annotations":{},"enabled":true,"globalMounts":[{"path":"/home/libretranslate/.local/share"}],"size":"20Gi","suffix":"share"}}Persistence volumes configuration for different data types
persistence.api-keys.enabledboolfalseEnable persistence for API keys database
persistence.cache.enabledbooltrueEnable temporary cache storage
persistence.db.enabledboolfalseEnable database storage for application data
persistence.files-translate.enabledbooltrueTemporary storage for uploaded translation files
persistence.share.enabledbooltrueEnable persistent shared storage for translation models and shared assets
persistence.share.suffixstring"share"Pin the PVC name suffix so it keeps matching pre-5.x installs: common 5.x only appends the identifier when more than one PVC is enabled, which would otherwise rename this PVC and orphan existing translation models.
routeobject{"main":{"enabled":false,"hostnames":["chart-example.local"],"kind":"HTTPRoute","parentRefs":[{"name":"gateway","namespace":"gateway-system"}],"rules":[{"backendRefs":[{"name":"main"}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]}}Gateway API HTTPRoute, mirroring the Ingress above. Disabled by default: pick either Ingress or HTTPRoute, not both. Requires the Gateway API CRDs and an existing Gateway in the cluster.
route.main.enabledboolfalseEnable the HTTPRoute. Mutually exclusive with ingress.main.enabled.
route.main.hostnameslist["chart-example.local"]Hostnames served by this route.
route.main.kindstring"HTTPRoute"Route kind. HTTPRoute, GRPCRoute, TCPRoute, TLSRoute or UDPRoute.
route.main.parentRefslist[{"name":"gateway","namespace":"gateway-system"}]Gateways this route attaches to.
route.main.ruleslist[{"backendRefs":[{"name":"main"}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]Routing rules. name resolves to a Service identifier defined above.
serviceobject{"main":{"controller":"main","ports":{"http":{"port":80,"protocol":"TCP","targetPort":5000}}}}Service configuration to expose the application internally in the cluster
service.main.ports.http.portint80External service port
service.main.ports.http.protocolstring"TCP"Protocol to use (TCP/UDP)
service.main.ports.http.targetPortint5000Internal container target port
tolerationslist[]Tolerations for pod assignment to specific nodes

Verifying the chart signature

Charts in this repository are signed with GPG and every release ships a provenance file. The public key is available at charts.obeone.cloud/public_key.gpg, fingerprint B9FE852F28888D27F8C9A11CD33E04CD22E335CE.

# Import the signing key into a legacy keyring (helm verifies with GnuPG v1 keyrings)
curl -fsSL https://charts.obeone.cloud/public_key.gpg | gpg --import
gpg --export > ~/.gnupg/pubring.gpg

# Pull the chart and check it against its provenance file
helm pull --verify obeone/libretranslate

Support

This is a personal chart repository, maintained on a best-effort basis. Bug reports and contributions are welcome on GitHub.


Autogenerated from chart metadata using helm-docs v1.14.2

Deploy libretranslate with OpenTenant

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