example-configuration/bot-cron.yaml

32 lines
921 B
YAML
Raw Permalink Normal View History

apiVersion: batch/v1
kind: CronJob
metadata:
name: bot-cronjob
spec:
2024-02-24 11:16:04 +00:00
schedule: "0 */6 * * *" # Runs every 6 hours
jobTemplate:
spec:
backoffLimit: 0
template:
spec:
containers:
- name: bot-job
image: git.fai.st/fedi-image-bot/mastodon-image-uploader-bot:v1.0.1
volumeMounts:
- name: config-toml
mountPath: /app/config.toml
subPath: config.toml
readOnly: true
- name: mastodon-token
mountPath: /app/mastodon-data.toml
subPath: mastodon-data.toml
readOnly: true
restartPolicy: Never
volumes:
- name: config-toml
configMap:
name: bot-config-toml
- name: mastodon-token
configMap:
name: mastodon-data