This commit is contained in:
Tommy Skaug 2024-04-06 16:19:43 +00:00
commit c7b547d72c
4 changed files with 41 additions and 3 deletions

View file

@ -4,7 +4,7 @@ description: |
document management system that transforms your physical documents into a searchable online archive
appVersion: v2.7.0
type: application
version: 0.1.0
version: 0.1.1
maintainers:
- name: Tommy Skaug
email: tommy@skaug.me

View file

@ -0,0 +1,21 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "paperless-ngx.fullname" . }}-db-init
labels:
{{- include "paperless-ngx.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
template:
spec:
restartPolicy: Never
containers:
- name: general-db-init
image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}"
envFrom:
- secretRef:
name: {{ .Values.postgres.secretName }}
# Tolerate a few failures, adjust the number as needed
backoffLimit: 3

View file

@ -31,6 +31,9 @@ metadata:
value: /PATHPREFIX
- name: PAPERLESS_STATIC_URL
value: /PATHPREFIX/static/
envFrom: &envFrom
- secretRef:
name: {{ .Values.envFromSecret }}
resources:
limits:
memory: "128Mi"
@ -45,4 +48,4 @@ metadata:
volumes:
- name: {{ include "paperless-ngx.fullname" . }}-server
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
claimName: {{ .Values.persistence.existingClaim }}

View file

@ -7,6 +7,20 @@ config:
persistence:
existingClaim: paperless-ngx-server
initContainers:
dbInit:
image:
repository: ghcr.io/onedr0p/postgres-init
tag: "16"
envFrom:
- secretRef:
name: paperless-ngx-secret
envFromSecret: paperless-ngx-secret
image:
repository: ghcr.io/paperless-ngx/paperless-ngx
tag: v2.7.0
tag: v2.7.0
postgres:
secretName: paperless-ngx-secret