51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
|
---
|
||
|
apiVersion: batch/v1beta1
|
||
|
kind: CronJob
|
||
|
metadata:
|
||
|
name: zammad-backup
|
||
|
namespace: zammad
|
||
|
labels:
|
||
|
component: cronjob
|
||
|
app: backup
|
||
|
spec:
|
||
|
failedJobsHistoryLimit: 0
|
||
|
successfulJobsHistoryLimit: 0
|
||
|
concurrencyPolicy: Forbid
|
||
|
schedule: "0 0 * * *"
|
||
|
jobTemplate:
|
||
|
spec:
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
component: cronjob
|
||
|
app: backup
|
||
|
spec:
|
||
|
volumes:
|
||
|
- name: zammad-backup
|
||
|
persistentVolumeClaim:
|
||
|
claimName: zammad-backup
|
||
|
containers:
|
||
|
- name: zammad-backup-s3
|
||
|
imagePullPolicy: Always
|
||
|
image: robbydooo/docker-backup-to-s3
|
||
|
args:
|
||
|
- "/start.sh"
|
||
|
- "no-cron"
|
||
|
envFrom:
|
||
|
- configMapRef:
|
||
|
name: zammad-backup
|
||
|
env:
|
||
|
- name: ACCESS_KEY
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
name: zammad-backup-s3
|
||
|
key: ACCESS_KEY
|
||
|
- name: SECRET_KEY
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
name: zammad-backup-s3
|
||
|
key: SECRET_KEY
|
||
|
volumeMounts:
|
||
|
- mountPath: /data
|
||
|
name: zammad-backup
|
||
|
restartPolicy: OnFailure
|