From 76586ece7f0714b9df975e75e595d7f6c782bbb4 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 7 Apr 2024 10:15:04 +0200 Subject: [PATCH] fix(paperless-ngx): Split into two pvc for media and data. Remove -server suffix. --- charts/paperless-ngx/Chart.yaml | 2 +- .../templates/deployment-server.yaml | 20 ++++++++++++------- .../templates/service-server.yaml | 4 ++-- charts/paperless-ngx/values.yaml | 3 ++- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/charts/paperless-ngx/Chart.yaml b/charts/paperless-ngx/Chart.yaml index 2dfe74c..e72b952 100644 --- a/charts/paperless-ngx/Chart.yaml +++ b/charts/paperless-ngx/Chart.yaml @@ -4,7 +4,7 @@ description: | document management system that transforms your physical documents into a searchable online archive appVersion: 2.7.0 type: application -version: 0.1.4 +version: 0.1.5 maintainers: - name: Tommy Skaug email: tommy@skaug.me diff --git a/charts/paperless-ngx/templates/deployment-server.yaml b/charts/paperless-ngx/templates/deployment-server.yaml index aca0ddf..b8d3bf3 100644 --- a/charts/paperless-ngx/templates/deployment-server.yaml +++ b/charts/paperless-ngx/templates/deployment-server.yaml @@ -8,15 +8,15 @@ spec: replicas: 1 selector: matchLabels: - app: {{ include "paperless-ngx.fullname" . }}-server + app: {{ include "paperless-ngx.fullname" . }} template: metadata: labels: - app: {{ include "paperless-ngx.fullname" . }}-server + app: {{ include "paperless-ngx.fullname" . }} spec: serviceAccountName: {{ include "paperless-ngx.fullname" . }} containers: - - name: {{ include "paperless-ngx.fullname" . }}-server + - name: {{ include "paperless-ngx.fullname" . }} image: {{ .Values.image.repository }}:{{ .Values.image.tag }} env: - name: PAPERLESS_URL @@ -42,10 +42,16 @@ spec: - containerPort: 80 name: http volumeMounts: - - name: {{ include "paperless-ngx.fullname" . }}-server - mountPath: "/usr/src/paperless" + - name: {{ include "paperless-ngx.fullname" . }}-media + mountPath: "/opt/paperless/media" + readOnly: false + - name: {{ include "paperless-ngx.fullname" . }}-data + mountPath: "/opt/paperless/media" readOnly: false volumes: - - name: {{ include "paperless-ngx.fullname" . }}-server + - name: {{ include "paperless-ngx.fullname" . }}-media persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim }} + claimName: {{ .Values.persistence.mediaExistingClaim }} + - name: {{ include "paperless-ngx.fullname" . }}-data + persistentVolumeClaim: + claimName: {{ .Values.persistence.dataExistingClaim }} diff --git a/charts/paperless-ngx/templates/service-server.yaml b/charts/paperless-ngx/templates/service-server.yaml index 1098ebc..a3f5645 100644 --- a/charts/paperless-ngx/templates/service-server.yaml +++ b/charts/paperless-ngx/templates/service-server.yaml @@ -2,12 +2,12 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "paperless-ngx.fullname" . }}-server + name: {{ include "paperless-ngx.fullname" . }} labels: {{- include "paperless-ngx.labels" . | nindent 4 }} spec: selector: - app: {{ include "paperless-ngx.fullname" . }}-server + app: {{ include "paperless-ngx.fullname" . }} ports: - port: 8000 targetPort: 8000 \ No newline at end of file diff --git a/charts/paperless-ngx/values.yaml b/charts/paperless-ngx/values.yaml index 1ad51c7..0e7403c 100644 --- a/charts/paperless-ngx/values.yaml +++ b/charts/paperless-ngx/values.yaml @@ -5,7 +5,8 @@ config: textRecognitionLanguates: eng nor persistence: - existingClaim: paperless-ngx-server + mediaExistingClaim: paperless-ngx-media + dataExistingClaim: paperless-ngx-data initContainers: dbInit: