k3s-cluster/kubernetes/main/apps/default/fireflyiii/app/daily-cronjob.yaml

34 lines
909 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
- wget -qO- http://fireflyiii: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