Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

[Paperless] - Update chart to use the 'Paperless-ng' fork #525

Merged
merged 3 commits into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/paperless/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v2
appVersion: 2.7.0
appVersion: 1.0.0
description: Paperless - Index and archive all of your scanned paper documents
name: paperless
version: 2.3.1
version: 3.0.0
keywords:
- paperless
home: https://github.com/k8s-at-home/charts/tree/master/charts/paperless
icon: https://raw.githubusercontent.com/the-paperless-project/paperless/master/src/paperless/static/paperless/img/logo-dark.png
sources:
- https://github.com/the-paperless-project/paperless
- https://github.com/jonaswinkler/paperless-ng
maintainers:
- name: mr-onion-2
dependencies:
Expand Down
19 changes: 13 additions & 6 deletions charts/paperless/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Paperless

This is a helm chart for [Paperless](https://github.com/the-paperless-project/paperless). The documentation can be found [here](https://paperless.readthedocs.io/en/latest/index.html).
This is a helm chart for [Paperless-ng](https://github.com/jonaswinkler/paperless-ng). The documentation can be found [here](https://paperless-ng.readthedocs.io/en/latest/).

**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose).**

Expand Down Expand Up @@ -35,16 +35,23 @@ The chart's [values.yaml](https://github.com/k8s-at-home/charts/blob/master/char
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
helm install paperless \
--set env.TZ="America/New_York" \
--set env.PAPERLESS_TIME_ZONE="America/New_York" \
k8s-at-home/paperless
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
helm install paperless k8s-at-home/paperless --values values.yaml
```
---

## Backup & Restore
Documents can be exported and re-imported by running the following commands directly on the pod. [More info](https://paperless.readthedocs.io/en/latest/migrating.html).
## Upgrading an existing Release to a new major version

Backup: `/usr/src/paperless/src/manage.py document_exporter /path/to/somewhere/`
Restore: `/usr/src/paperless/src/manage.py document_importer /path/to/somewhere/`
A major chart version change (like 1.0.1 -> 2.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.

### Upgrading from 2.x.x to 3.x.x

Version 3.0.0 of this chart has been adapted for [Paperless-ng](https://github.com/jonaswinkler/paperless-ng) (currently a fork of the main project). The default `values.yaml` has been updated accordingly. Changes include:

* A new set of [environment variables](https://github.com/jonaswinkler/paperless-ng/blob/master/paperless.conf.example)
* New mouthPath defaults for the consume and export volumes
* Seperate consumer pod no longer required.
4 changes: 0 additions & 4 deletions charts/paperless/ci/ct-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ persistence:
data:
enabled: true
emptyDir: true
mountPath: /usr/src/paperless/data
media:
enabled: true
emptyDir: true
mountPath: /usr/src/paperless/media
consume:
enabled: true
emptyDir: true
mountPath: /consume
export:
enabled: true
emptyDir: true
mountPath: /export
5 changes: 4 additions & 1 deletion charts/paperless/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{{- include "common.notes.defaultNotes" . -}}
{{- include "common.notes.defaultNotes" . }}
2. Create a super user by running the command:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
kubectl exec -it --namespace {{ .Release.Namespace }} $POD_NAME -- bash -c "python manage.py createsuperuser"
45 changes: 18 additions & 27 deletions charts/paperless/values.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
# Default values for Paperless.

image:
repository: thepaperlessproject/paperless
repository: jonaswinkler/paperless-ng
pullPolicy: IfNotPresent
tag: latest

args: "['gunicorn', '-b', '0.0.0.0:8000']"

strategy:
type: Recreate

# See the following files for supported environment variables
# https://github.com/the-paperless-project/paperless/blob/master/docker-compose.env.example
# https://github.com/the-paperless-project/paperless/blob/master/paperless.conf.example
# See the following files for additional environment variables
# https://github.com/jonaswinkler/paperless-ng/tree/master/docker/compose/
# https://github.com/jonaswinkler/paperless-ng/blob/master/paperless.conf.example
env:
# TZ: Europe/London
PAPERLESS_OCR_LANGUAGES: eng
# PAPERLESS_FORGIVING_OCR: true
# PAPERLESS_DISABLE_LOGIN: true
# PAPERLESS_INLINE_DOC: true
# PAPERLESS_OCR_THREADS:
# PAPERLESS_CONVERT_DENSITY:
COMPOSE_PROJECT_NAME: paperless
PAPERLESS_REDIS: redis://localhost:6379
PAPERLESS_OCR_LANGUAGE: eng
# USERMAP_UID: 1000
# USERMAP_GID: 1000
# PAPERLESS_TIME_ZONE: Europe/London

service:
port:
Expand All @@ -30,27 +27,21 @@ persistence:
data:
enabled: false
mountPath: /usr/src/paperless/data
emptyDir: false
media:
enabled: false
mountPath: /usr/src/paperless/media
emptyDir: false
consume:
enabled: false
mountPath: /consume
mountPath: /usr/src/paperless/consume
emptyDir: false
export:
enabled: false
mountPath: /export
mountPath: /usr/src/paperless/export
emptyDir: false

additionalContainers:
- name: consumer
image: thepaperlessproject/paperless:latest
- name: broker
image: redis:6.0
imagePullPolicy: IfNotPresent
args: ['document_consumer']
volumeMounts:
- mountPath: /usr/src/paperless/data
name: data
- mountPath: /usr/src/paperless/media
name: media
- mountPath: /consume
name: consume
- mountPath: /export
name: export