From 2d67af32a24d15f86d0f9c5a0d0229873a994c15 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 25 Nov 2025 13:51:44 +0100 Subject: [PATCH 1/2] Add support for logs directory in paperless-ai chart This commit introduces a new volume mount for a logs directory in the paperless-ai Helm chart. The deployment configuration is updated to include a `logs-dir` volume that is mounted at `/app/logs`, allowing for the collection and management of logs generated by the application. Additionally, the version of the chart has been incremented to `0.1.4-test1` to reflect this change. The build workflow is also modified to trigger on pushes to the `patch-paperless-ai` branch, ensuring that changes can be tested separately from the main branch. These adjustments enhance observability and facilitate better troubleshooting by storing logs in a dedicated directory. No breaking changes are introduced. --- .gitea/workflows/build-chart-paperless-ai.yml | 1 + charts/paperless-ai/Chart.yaml | 2 +- charts/paperless-ai/templates/deployment.yaml | 10 ++++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build-chart-paperless-ai.yml b/.gitea/workflows/build-chart-paperless-ai.yml index 710e628..68e4a63 100644 --- a/.gitea/workflows/build-chart-paperless-ai.yml +++ b/.gitea/workflows/build-chart-paperless-ai.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - patch-papaerless-ai paths: - "charts/paperless-ai/Chart.yaml" diff --git a/charts/paperless-ai/Chart.yaml b/charts/paperless-ai/Chart.yaml index ffc2f1c..6cc7a69 100644 --- a/charts/paperless-ai/Chart.yaml +++ b/charts/paperless-ai/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: paperless-ai description: Ein Helm Chart für Paperless AI, basierend auf der Docker Compose Konfiguration. -version: 0.1.4 +version: 0.1.4-test1 appVersion: 3.0.9 keywords: - paperless-ai diff --git a/charts/paperless-ai/templates/deployment.yaml b/charts/paperless-ai/templates/deployment.yaml index 5efad98..a5ab7f7 100644 --- a/charts/paperless-ai/templates/deployment.yaml +++ b/charts/paperless-ai/templates/deployment.yaml @@ -53,8 +53,10 @@ spec: - name: {{ $key }} # Name der Umgebungsvariable. value: {{ $value | quote }} # Wert der Umgebungsvariable. {{- end }} - {{- if .Values.persistence.enabled }} volumeMounts: + - name: logs-dir + mountPath: /app/logs + {{- if .Values.persistence.enabled }} - name: paperless-ai-data # Name des Volumes, das gemountet werden soll. mountPath: /app/data # Der Pfad im Container, an dem das Volume gemountet wird. {{- end }} @@ -72,8 +74,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} # Toleranzen für die Pod-Platzierung auf Tainted Nodes. {{- end }} - {{- if .Values.persistence.enabled }} + volumes: + - name: logs-dir + emptyDir: + sizeLimit: 100Mi + {{- if .Values.persistence.enabled }} - name: paperless-ai-data # Definiert ein Volume mit dem Namen 'paperless-ai-data'. persistentVolumeClaim: claimName: {{ include "paperless-ai.fullname" . }}-data # Verweist auf den Persistent Volume Claim. -- 2.49.1 From 68d1b042234ab4aafbab399fed340a573cb12178 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 25 Nov 2025 14:02:08 +0100 Subject: [PATCH 2/2] Update Paperless AI Helm chart version and configuration Updated the Paperless AI Helm chart version from 0.1.4-test1 to 0.1.5 to reflect the latest changes. The environment variable configuration for PUID and PGID has been updated from 0 to 1000 and 2000, respectively, to align with common user and group IDs used within Docker containers. Additionally, the security context for the pod is now enabled to enhance security practices by running the container with the specified user and group IDs. This change may impact existing deployments that relied on the previous settings. --- .gitea/workflows/build-chart-paperless-ai.yml | 1 - charts/paperless-ai/Chart.yaml | 2 +- charts/paperless-ai/values.yaml | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build-chart-paperless-ai.yml b/.gitea/workflows/build-chart-paperless-ai.yml index 68e4a63..710e628 100644 --- a/.gitea/workflows/build-chart-paperless-ai.yml +++ b/.gitea/workflows/build-chart-paperless-ai.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - patch-papaerless-ai paths: - "charts/paperless-ai/Chart.yaml" diff --git a/charts/paperless-ai/Chart.yaml b/charts/paperless-ai/Chart.yaml index 6cc7a69..6cdb3a4 100644 --- a/charts/paperless-ai/Chart.yaml +++ b/charts/paperless-ai/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: paperless-ai description: Ein Helm Chart für Paperless AI, basierend auf der Docker Compose Konfiguration. -version: 0.1.4-test1 +version: 0.1.5 appVersion: 3.0.9 keywords: - paperless-ai diff --git a/charts/paperless-ai/values.yaml b/charts/paperless-ai/values.yaml index 9a290cc..09c8372 100644 --- a/charts/paperless-ai/values.yaml +++ b/charts/paperless-ai/values.yaml @@ -53,8 +53,8 @@ service: targetPort: 3000 env: - PUID: 0 # 1000 - PGID: 0 # 2000 + PUID: 1000 + PGID: 2000 PAPERLESS_AI_PORT: 3000 RAG_SERVICE_URL: http://localhost:8000 RAG_SERVICE_ENABLED: true @@ -79,7 +79,7 @@ readinessProbe: # Sicherheitskontext-Einstellungen für Pod und Container. securityContext: - enabled: false + enabled: true pod: runAsUser: 1000 runAsGroup: 2000 -- 2.49.1