From 7d3997fc75697c8b4c51f49cebf557e7cbeb5f2c Mon Sep 17 00:00:00 2001 From: TheDodger Date: Sat, 26 Jul 2025 12:21:53 +0200 Subject: [PATCH] feat(paperless-ngx): add tika and gotenberg (#37727) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Addition of the optional Tika (and with it Gotenberg) add-on. Completely optional and non breaking, creates two additional containers when enabled, so could be merged into the existing Paperless chart. I'll open another pull request after incubation is finished. Dependencies get fetched from docker.io, both times the official source. **โš™๏ธ Type of change** - [X] โš™๏ธ Feature/App addition - [ ] ๐Ÿช› Bugfix - [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] ๐Ÿ”ƒ Refactor of current code - [ ] ๐Ÿ“œ Documentation Changes **๐Ÿงช How Has This Been Tested?** In my head. **๐Ÿ“ƒ Notes:** This should work out of the box, but I would like to test further out of incubate. Could probably **โœ”๏ธ Checklist:** - [x] โš–๏ธ My code follows the style guidelines of this project - [x] ๐Ÿ‘€ I have performed a self-review of my own code - [ ] #๏ธโƒฃ I have commented my code, particularly in hard-to-understand areas - [ ] ๐Ÿ“„ I have made changes to the documentation - [ ] ๐Ÿงช I have added tests to this description that prove my fix is effective or that my feature works - [x] โฌ†๏ธ I increased versions for any altered app according to semantic versioning - [x] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or `fix(docs):` **โž• App addition** If this PR is an app addition please make sure you have done the following. - [ ] ๐Ÿ–ผ๏ธ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- charts/stable/paperless-ngx/Chart.yaml | 4 +- charts/stable/paperless-ngx/values.yaml | 80 ++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 6 deletions(-) diff --git a/charts/stable/paperless-ngx/Chart.yaml b/charts/stable/paperless-ngx/Chart.yaml index 9e9e0097f04..9a32f92ce59 100644 --- a/charts/stable/paperless-ngx/Chart.yaml +++ b/charts/stable/paperless-ngx/Chart.yaml @@ -2,8 +2,6 @@ annotations: artifacthub.io/links: |- - name: support url: https://discord.com/invite/tVsPTHWTtr - max_scale_version: 24.04.1 - min_scale_version: 24.04.0 truecharts.org/category: productivity truecharts.org/max_helm_version: "3.17" truecharts.org/min_helm_version: "3.14" @@ -46,5 +44,5 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/stable/paperless-ngx - https://paperless-ngx.readthedocs.io/en/latest/ type: application -version: 11.2.0 +version: 11.3.0 diff --git a/charts/stable/paperless-ngx/values.yaml b/charts/stable/paperless-ngx/values.yaml index c2c2bd5ffd2..3635e8b9ce9 100644 --- a/charts/stable/paperless-ngx/values.yaml +++ b/charts/stable/paperless-ngx/values.yaml @@ -2,12 +2,34 @@ image: repository: ghcr.io/paperless-ngx/paperless-ngx pullPolicy: IfNotPresent tag: 2.17.1@sha256:ab72a0ab42a792228cdbe83342b99a48acd49f7890ae54b1ae8e04401fba24ee +gotenbergImage: + repository: docker.io/gotenberg/gotenberg + pullPolicy: IfNotPresent + tag: 8.21@sha256:91486863744f7420ca985ee6cef7c216910e40faffd378f3da7c0fad724d01ba +tikaImage: + repository: docker.io/apache/tika + pullPolicy: IfNotPresent + tag: 3.2.1.0@sha256:df12b41af58c9833e60bdc231ffc4b59f5b7a83bfe2d63e3dc7aab7da923abba service: main: ports: main: targetPort: 8000 port: 10140 + gotenberg: + enabled: "{{ .Values.tika.enabled }}" + ports: + gotenberg: + enabled: true + targetPort: 3000 + port: 3000 + tika: + enabled: "{{ .Values.tika.enabled }}" + ports: + tika: + enabled: true + targetPort: 9998 + port: 9998 persistence: data: enabled: true @@ -22,12 +44,14 @@ persistence: enabled: false redis: enabled: true - redisUsername: default + redisUsername: "default" cnpg: main: enabled: true - user: paperless-ng - database: paperless-ng + user: "paperless-ng" + database: "paperless-ng" +tika: + enabled: false securityContext: container: @@ -65,6 +89,9 @@ workload: PAPERLESS_DBNAME: "{{ .Values.cnpg.main.database }}" PAPERLESS_DBUSER: "{{ .Values.cnpg.main.user }}" PAPERLESS_DBPORT: "5432" + PAPERLESS_TIKA_ENABLED: '{{ ternary 1 0 .Values.tika.enabled }}' + PAPERLESS_TIKA_GOTENBERG_ENDPOINT: '{{ printf "http://%v-gotenberg:%v" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.gotenberg.ports.gotenberg.targetPort }}' + PAPERLESS_TIKA_ENDPOINT: '{{ printf "http://%v-tika:%v" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.tika.ports.tika.targetPort }}' PAPERLESS_WEBSERVER_WORKERS: 2 PAPERLESS_DBPASS: secretKeyRef: @@ -88,3 +115,50 @@ workload: PAPERLESS_ADMIN_MAIL: "admin@admin.com" PAPERLESS_OCR_LANGUAGE: "eng" PAPERLESS_OCR_LANGUAGES: "eng fra deu spa ita" + gotenberg: + enabled: "{{ .Values.tika.enabled }}" + type: Deployment + podSpec: + containers: + gotenberg: + enabled: true + imageSelector: gotenbergImage + command: + - "gotenberg" + - "--chromium-disable-javascript=true" + - "--chromium-allow-list=file:///tmp/.*" + probes: + liveness: + type: http + path: /health + port: "{{ .Values.service.gotenberg.ports.gotenberg.port }}" + startup: + type: http + path: /health + port: "{{ .Values.service.gotenberg.ports.gotenberg.port }}" + readiness: + type: http + path: /health + port: "{{ .Values.service.gotenberg.ports.gotenberg.port }}" + tika: + enabled: "{{ .Values.tika.enabled }}" + type: Deployment + podSpec: + containers: + tika: + enabled: true + imageSelector: tikaImage + probes: + liveness: + type: http + path: / + port: "{{ .Values.service.tika.ports.tika.port }}" + startup: + type: http + path: / + port: "{{ .Values.service.tika.ports.tika.port }}" + readiness: + type: http + path: / + port: "{{ .Values.service.tika.ports.tika.port }}" +