K3s-cluster/gitlab/cronjob.yaml
Tanguy Herbron 5f870e9ca0 feat(gitlab): Add basic Gitlab configuration
Contains basic deployment and networking requirement, awaiting custom configuration and proper volume management.
2022-10-17 00:35:03 +02:00

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