Tanguy Herbron
5f870e9ca0
Contains basic deployment and networking requirement, awaiting custom configuration and proper volume management.
26 lines
821 B
YAML
26 lines
821 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: backup-job
|
|
namespace: gitlab
|
|
spec:
|
|
schedule: "0 4 * * *" # Every day at 4AM
|
|
concurrencyPolicy: Forbid
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: maria-backup
|
|
image: mariadb
|
|
command: ["sh", "-c", "echo hi"]
|
|
volumeMounts:
|
|
- name: gitlab-backup
|
|
mountPath: /backup/gitlab
|
|
subPath: gitlab
|
|
volumes:
|
|
- name: gitlab-backup
|
|
persistentVolumeClaim:
|
|
claimName: gitlab-backup-pvc
|
|
restartPolicy: OnFailure
|