Files
helm-charts/paperless-ngx/templates/paperless-consume.cronjob.yaml
T
jklein 29ac6d09c5 Paperless-ngx chart: naming scheme, secret refs, pinned init images (conventions batch 3)
Batch-3 major PR for paperless-ngx (issue #32):

- secrets.redisRef/databaseRef/paperlessRef -> redisSecretRef/
  databaseSecretRef/paperlessSecretRef (consistent with the other
  SecretRef values in the same block); CI fixtures updated
- TLS secret renamed to the standard tls-<release>-<chart>-ingress
  (domain no longer part of the name)
- busybox init/cronjob image pinned via paperless.busybox.image
  values, default bumped 1.28 -> 1.38.0
- probes values-configurable (defaults unchanged, incl. the 600s
  startup budget); consume CronJob deliberately stays probe-less
- ingress standard: ingress.className (default nginx) and
  ingress.annotations merge; domain/clusterIssuer stay required
- additive paperless.env block rendered through tpl (value,
  secretKeyRef, configMapKeyRef forms)
- disabled scripts ConfigMap renamed to ...-configmap; PVC names kept
  as documented naming-scheme exception (comments in the templates)
- chart 8.0.1+up3.0.5 -> 9.0.0+up3.0.5 (breaking values changes)
2026-08-22 19:39:54 +02:00

45 lines
1.7 KiB
YAML

{{- if .Values.smbConnection.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-consume-cronjob
spec:
schedule: {{ .Values.smbConnection.cronJob }}
{{- if .Values.scaleDown }}
suspend: true
{{- end }}
jobTemplate:
spec:
template:
spec:
automountServiceAccountToken: false
securityContext:
{{- toYaml .Values.smbConnection.cron.securityContext.pod | nindent 12 }}
containers:
- name: paperless-consume-cronjob
image: "{{ .Values.paperless.busybox.image.repository }}:{{ .Values.paperless.busybox.image.tag }}"
imagePullPolicy: IfNotPresent
securityContext:
{{- toYaml .Values.smbConnection.cron.securityContext.container | nindent 16 }}
command:
- /bin/sh
- -c
- if [ "$(find /mnt/smb -maxdepth 1 -name "*.pdf" -print)" ]; then mv /mnt/smb/*.pdf /mnt/consume; fi
volumeMounts:
- name: smb-share
mountPath: "/mnt/smb"
readOnly: false
- name: consume-folder
mountPath: "/mnt/consume"
readOnly: false
resources:
{{- include "paperless-ngx.resources" .Values.smbConnection.cron.resources | nindent 16 }}
restartPolicy: Never
volumes:
- name: smb-share
persistentVolumeClaim:
claimName: {{ .Release.Name }}-{{ .Chart.Name }}-smb-volume-claim
- name: consume-folder
persistentVolumeClaim:
claimName: {{ .Release.Name }}-{{ .Chart.Name }}-consume-volume-claim
{{- end }}