forked from LibreTranslate/helm-chart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix values.yaml so we can easily use helm-docs
- Loading branch information
Showing
3 changed files
with
176 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,95 @@ | ||
# LibreTranslate Helm Chart | ||
|
||
This Helm chart deploys a LibreTranslate instance on a Kubernetes cluster using the Helm package manager. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.12+ | ||
- Helm 3.0+ | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `libretranslate`: | ||
|
||
```bash | ||
helm install libretranslate ./chart --namespace libretranslate --create-namespace | ||
``` | ||
|
||
This command deploys LibreTranslate on the Kubernetes cluster with the default configuration. The [values.yaml](values.yaml) file lists the parameters that can be configured during installation. | ||
|
||
> **Tip**: List all releases using `helm list` | ||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `libretranslate` deployment: | ||
|
||
```bash | ||
helm delete libretranslate | ||
``` | ||
|
||
This command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
|
||
See [values.yaml](values.yaml) for the full list of parameters that can be configured. You can specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```bash | ||
helm install libretranslate ./chart --namespace libretranslate --create-namespace --set service.port=8080 | ||
``` | ||
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, | ||
|
||
```bash | ||
helm install libretranslate ./chart --namespace libretranslate --create-namespace -f values.yaml | ||
``` | ||
|
||
## Upgrade | ||
|
||
Run the following command to upgrade your LibreTranslate installation. This command will use the Helm chart in the ./chart directory, apply the custom values from values.yaml, and deploy the upgrade to the `libretranslate` namespace: | ||
|
||
```bash | ||
helm upgrade --install libretranslate ./chart --namespace libretranslate -f values.yaml | ||
``` | ||
|
||
> **Tip**: You can use the default [values.yaml](values.yaml) | ||
# References | ||
- [https://jmrobles.medium.com/libretranslate-your-own-translation-service-on-kubernetes-b46c3e1af630](https://jmrobles.medium.com/libretranslate-your-own-translation-service-on-kubernetes-b46c3e1af630) | ||
- [https://github.com/LibreTranslate/LibreTranslate](https://github.com/LibreTranslate/LibreTranslate) | ||
# libretranslate | ||
|
||
![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) | ||
|
||
A Helm chart for Kubernetes to deploy LibreTranslate API | ||
|
||
**Homepage:** <https://libretranslate.github.io/helm-chart/> | ||
|
||
## Source Code | ||
|
||
* <https://github.com/LibreTranslate/LibreTranslate/> | ||
* <https://github.com/LibreTranslate/helm-chart/> | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| adminUser.auth | string | `"YWRtaW46JGFwcjEkYlpydmYvUFYkSHBHSlhqZU1EN0ZON2kyYndsMVRNMQoK"` | copy the output from the htpasswd command here as a reference | | ||
| adminUser.existingSecret | string | `""` | use an existing secret for admin user | | ||
| adminUser.name | string | `"YWRtaW4K"` | copy the username in base64 as a reference | | ||
| adminUser.password | string | `"bXlTZWNyZXRQYXNzd29yZAo="` | copy the password as base64 for the admin user here as a reference | | ||
| adminUser.secretKeys.auth | string | `"auth"` | | | ||
| adminUser.secretKeys.name | string | `"name"` | | | ||
| adminUser.secretKeys.password | string | `"password"` | | | ||
| annotations | object | `{}` | Extra annotations | | ||
| appConfig.apiKeysDbPath | string | `"/app/db/api_keys.db"` | Use a specific path inside the container for the local database. Can be absolute or relative (Default: /app/db/api_keys.db) | | ||
| appConfig.apiKeysDbPathMount | string | `"/app/db"` | Use a specific path inside the container for the local database. Must be the same as apiKeysDbPath (Default: /app/db) | | ||
| appConfig.apiKeysRemote | string | `""` | Use this remote endpoint to query for valid API keys instead of using the local database (Default: Empty (use local db instead)) | | ||
| appConfig.batchLimit | string | `"null"` | Set maximum number of texts to translate in a batch request (Default: No limit) | | ||
| appConfig.charLimit | string | `"null"` | Set character limit (Default: No limit) | | ||
| appConfig.frontendLanguageSource | string | `"auto"` | Set frontend default language - source (Default: auto) | | ||
| appConfig.frontendLanguageTarget | string | `"locale"` | Set frontend default language - target (Default: locale (match site's locale)) | | ||
| appConfig.frontendTimeout | string | `"500"` | Set frontend translation timeout (Default: 500) | | ||
| appConfig.gaId | string | `""` | Enable Google Analytics on the API client page by providing an ID (Default: Empty (no tracking)) | | ||
| appConfig.getApiKeyLink | string | `""` | Show a link in the UI where to direct users to get an API key (Default: Empty (no link shown on web ui)) | | ||
| appConfig.host | string | `"0.0.0.0"` | Set host to bind the server to (Default: 127.0.0.1) | | ||
| appConfig.loadOnly | string | `""` | Set available languages (Default: Empty (use all from argostranslate)) | | ||
| appConfig.metricsAuthToken | string | `""` | Protect the /metrics endpoint by allowing only clients that have a valid Authorization Bearer token (Default: Empty (no auth required)) | | ||
| appConfig.port | string | `"5000"` | Set port to bind the server to (Default: 5000) | | ||
| appConfig.reqLimit | string | `"null"` | Set maximum number of requests per minute per client (outside of limits set by api keys) (Default: No limit) | | ||
| appConfig.reqLimitStorage | string | `"memory://"` | Storage URI to use for request limit data storage. See Flask Limiter (Default: memory://) | | ||
| appConfig.sharedStorage | string | `"memory://"` | Shared storage URI to use for multi-process data sharing (e.g. when using gunicorn) (Default: memory://) | | ||
| appConfig.threads | string | `"4"` | Set number of threads (Default: 4) | | ||
| appConfig.urlPrefix | string | `""` | Add prefix to URL: example.com:5000/url-prefix/ (Default: /) | | ||
| appSettings.apiKeys | string | `"false"` | | | ||
| appSettings.debug | string | `"false"` | Enable debug environment (Default: Disabled) | | ||
| appSettings.disableFilesTranslation | string | `"false"` | Disable files translation (Default: File translation allowed) | | ||
| appSettings.disableWebUi | string | `"false"` | Disable web ui (Default: Web Ui enabled) | | ||
| appSettings.existingSecret | string | `""` | use an existing secret for api key origin and secret | | ||
| appSettings.metrics | string | `"false"` | Enable the /metrics endpoint for exporting Prometheus usage metrics (Default: Disabled) | | ||
| appSettings.requireApiKeyOrigin | string | `""` | Require use of an API key for programmatic access to the API, unless the request origin matches this domain (Default: No restrictions on domain origin) | | ||
| appSettings.requireApiKeySecret | string | `""` | Require use of an API key for programmatic access to the API, unless the client also sends a secret match (Default: No secrets required) | | ||
| appSettings.secretKeys.apiKeyorigin | string | `""` | | | ||
| appSettings.secretKeys.apiKeysecret | string | `"secret"` | | | ||
| appSettings.ssl | string | `"false"` | Enable SSL (Default: Disabled) | | ||
| appSettings.suggestions | string | `"false"` | Allow user suggestions (Default: Disabled) | | ||
| appSettings.updateModels | string | `"false"` | Update language models at startup (Default: Only on if no models found) | | ||
| fullnameOverride | string | `""` | Full name of the deployment to override the default one | | ||
| image.pullPolicy | string | `"Always"` | | | ||
| image.repository | string | `"libretranslate/libretranslate"` | | | ||
| image.tag | string | `"latest"` | | | ||
| imagePullSecrets | list | `[]` | | | ||
| ingress.annotations."nginx.ingress.kubernetes.io/proxy-body-size" | string | `"10m"` | | | ||
| ingress.className | string | `""` | set this to the name of the ingress controller class to use like nginx | | ||
| ingress.enabled | bool | `false` | | | ||
| ingress.hosts[0].host | string | `"translate.example.com"` | | | ||
| ingress.hosts[0].paths[0].path | string | `"/"` | | | ||
| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | | ||
| initContainerSecurityContext.runAsGroup | int | `0` | | | ||
| initContainerSecurityContext.runAsUser | int | `0` | | | ||
| livenessProbe | object | `{}` | Liveness probe for kubernetes | | ||
| nameOverride | string | `""` | Chart name override | | ||
| persistence.db.accessMode | string | `"ReadWriteOnce"` | | | ||
| persistence.db.size | string | `"1Gi"` | | | ||
| persistence.db.storageClass | string | `""` | | | ||
| persistence.enabled | bool | `false` | | | ||
| persistence.models.accessMode | string | `"ReadWriteOnce"` | | | ||
| persistence.models.size | string | `"10Gi"` | as of August 2023, the models are about 6.6GB in size for all languages | | ||
| persistence.models.storageClass | string | `""` | | | ||
| podAnnotations | object | `{}` | Extra annotations for pods | | ||
| podSecurityContext.runAsGroup | int | `1032` | | | ||
| podSecurityContext.runAsUser | int | `1032` | | | ||
| readinessProbe | object | `{}` | Readiness probe for kubernetes | | ||
| replicaCount | int | `1` | Number of replicas | | ||
| resources.limits.cpu | int | `1` | | | ||
| resources.limits.memory | string | `"2Gi"` | | | ||
| resources.requests.cpu | string | `"500m"` | | | ||
| resources.requests.memory | string | `"1Gi"` | | | ||
| securityContext.fsGroup | int | `1032` | | | ||
| service.port | int | `5000` | | | ||
| service.type | string | `"ClusterIP"` | | | ||
| tolerations | list | `[]` | Extra tolerations for pods | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters