k3s-cluster/cluster/apps/default/fireflyiii/daily-cronjob.yaml

34 lines
910 B
YAML
Raw Normal View History

2023-06-17 15:09:11 -04:00
apiVersion: batch/v1
kind: CronJob
metadata:
name: firefly-cronjob
namespace: default
spec:
# 0am every day
schedule: "0 0 * * *"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 2
jobTemplate:
spec:
template:
spec:
containers:
- name: firefly-cronjob
2023-06-17 15:31:26 -04:00
image: frolvlad/alpine-bash
2023-06-17 15:09:11 -04:00
imagePullPolicy: IfNotPresent
command:
2023-06-17 15:31:26 -04:00
- /bin/bash
- -c
2023-06-17 15:23:26 -04:00
- wget -qO- http://firefly-iii:8080/api/v1/cron/$(cat /etc/crontoken)
2023-06-17 15:09:11 -04:00
volumeMounts:
- name: ff-secret
mountPath: /etc/crontoken
subPath: STATIC_CRON_TOKEN
securityContext:
runAsNonRoot: true
runAsUser: 1000
restartPolicy: OnFailure
volumes:
- name: ff-secret
secret:
secretName: firefly-env-secret