Commit 629a0343 authored by Elouan Martinet's avatar Elouan Martinet
Browse files

[deploy] Move daily backup CronJob into a separate file

This backup is optional.
parent ecb358a1681c
Pipeline #14505 passed with stage
in 5 minutes and 1 second
......@@ -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