Files
homelab/k8s/apps/firefly-iii/data-importer-sync.yaml
T
Aleksandr Bogomiakov 1091d6bd14
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 10s
Check with kubeconform / lint (push) Successful in 9s
Auto-update README / Generate README and Create MR (push) Successful in 7s
Enabled auto sync openbanking
2026-08-01 14:43:48 +01:00

107 lines
3.5 KiB
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: firefly-data-importer-sync
labels:
app.kubernetes.io/name: firefly-data-importer-sync
spec:
schedule: "17 */6 * * *"
timeZone: Europe/London
concurrencyPolicy: Forbid
startingDeadlineSeconds: 1800
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 5
jobTemplate:
spec:
backoffLimit: 1
activeDeadlineSeconds: 1200
template:
metadata:
labels:
app.kubernetes.io/name: firefly-data-importer-sync
spec:
automountServiceAccountToken: false
restartPolicy: Never
nodeSelector:
kubernetes.io/hostname: ai.tail2fe2d.ts.net
tolerations:
- key: workload
operator: Equal
value: ai
effect: NoSchedule
containers:
- name: data-importer-sync
image: fireflyiii/data-importer:version-2.3.4
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- |-
php artisan importer:import /import/import.json
status=$?
if [ "${status}" -eq 73 ]; then
echo "No new transactions; considering the sync successful."
exit 0
fi
exit "${status}"
env:
- name: FIREFLY_III_URL
value: http://firefly-iii
- name: VANITY_URL
value: http://ff.lan
- name: FIREFLY_III_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: firefly-data-importer-secrets
key: FIREFLY_III_ACCESS_TOKEN
- name: ENABLE_BANKING_APP_ID
valueFrom:
secretKeyRef:
name: firefly-data-importer-secrets
key: ENABLE_BANKING_APP_ID
- name: ENABLE_BANKING_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: firefly-data-importer-secrets
key: ENABLE_BANKING_PRIVATE_KEY
- name: IMPORT_DIR_ALLOWLIST
value: /import
# Recurring imports intentionally overlap their date range.
# Keep rejecting duplicates, but do not fail the Job for them.
- name: IGNORE_DUPLICATE_ERRORS
value: "true"
- name: TZ
value: Europe/London
- name: APP_ENV
value: production
- name: APP_DEBUG
value: "false"
- name: LOG_LEVEL
value: notice
volumeMounts:
- name: import-config
mountPath: /import
readOnly: true
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: "1"
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
volumes:
- name: import-config
secret:
secretName: firefly-data-importer-secrets
items:
- key: import.json
path: import.json
securityContext:
seccompProfile:
type: RuntimeDefault