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

34 lines
910 B
YAML
Raw Normal View History

2023-06-17 19:09:11 +00: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 19:31:26 +00:00
image: frolvlad/alpine-bash
2023-06-17 19:09:11 +00:00
imagePullPolicy: IfNotPresent
command:
2023-06-17 19:31:26 +00:00
- /bin/bash
- -c
2023-06-17 19:23:26 +00:00
- wget -qO- http://firefly-iii:8080/api/v1/cron/$(cat /etc/crontoken)
2023-06-17 19:09:11 +00: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