feat: create db-init.yaml for paperless-ngx

This commit is contained in:
Tommy Skaug 2024-04-06 17:59:09 +02:00 committed by GitHub
parent 6cd445a691
commit 73a2d13251
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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