Commit 99f8a292 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

Merge branch 'topic/default/deploy-move-backup-cronjob' into 'branch/default'

[deploy] Move daily backup CronJob into a separate file

See merge request !2
Pipeline #14648 passed with stage
in 4 minutes and 45 seconds
......@@ -13,3 +13,4 @@ recursive-include docker *.ini *.j2 *.sh *.txt
recursive-include deploy *.yaml
prune debian
exclude .gitlab-ci.yml
prune deploy
deployment.yaml is used to deploy fresh on Kubernetes.
backup.yaml defines a CronJob for daily backup of the database, it is optional.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: fresh-backup
spec:
schedule: "0 6 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
metadata:
labels:
app: fresh
spec:
restartPolicy: Never
volumes:
- name: backup
persistentVolumeClaim:
claimName: backup
containers:
- name: fresh
image: r.intra.logilab.fr/intranet/fresh
imagePullPolicy: Always
command: ["cubicweb-ctl", "db-dump", "fresh"]
envFrom:
- secretRef:
name: fresh-env
volumeMounts:
- name: backup
mountPath: /etc/cubicweb.d/fresh/backup
resources:
requests:
cpu: 50m
memory: 500Mi
......@@ -180,38 +180,3 @@ spec:
ports:
- protocol: TCP
port: 8000
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: fresh-backup
spec:
schedule: "0 6 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
metadata:
labels:
app: fresh
spec:
restartPolicy: Never
volumes:
- name: backup
persistentVolumeClaim:
claimName: backup
containers:
- name: fresh
image: r.intra.logilab.fr/intranet/fresh
imagePullPolicy: Always
command: ["cubicweb-ctl", "db-dump", "fresh"]
envFrom:
- secretRef:
name: fresh-env
volumeMounts:
- name: backup
mountPath: /etc/cubicweb.d/fresh/backup
resources:
requests:
cpu: 50m
memory: 500Mi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment