Commit 0ff2d1eb authored by Elouan Martinet's avatar Elouan Martinet
Browse files

[deploy] Move daily backup CronJob into a separate file

This backup is optional.
parent f3c822298b84
......@@ -10,3 +10,4 @@ include Dockerfile .dockerignore
recursive-include docker *.ini *.j2 *.sh *.txt
recursive-include deploy *.yaml
prune debian
prune deploy
deployment.yaml is used to deploy intranet on Kubernetes.
backup.yaml defines a CronJob for daily backup of the database, it is optional.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: intranet-backup
spec:
schedule: "0 6 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
metadata:
labels:
app: intranet
spec:
restartPolicy: Never
volumes:
- name: backup
persistentVolumeClaim:
claimName: backup
containers:
- name: intranet
image: r.intra.logilab.fr/intranet/intranet
imagePullPolicy: Always
command: ["cubicweb-ctl", "db-dump", "intranet"]
envFrom:
- secretRef:
name: intranet-env
volumeMounts:
- name: backup
mountPath: /etc/cubicweb.d/intranet/backup
resources:
requests:
cpu: 50m
memory: 500Mi
......@@ -151,38 +151,3 @@ spec:
ports:
- protocol: TCP
port: 8000
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: intranet-backup
spec:
schedule: "0 6 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
metadata:
labels:
app: intranet
spec:
restartPolicy: Never
volumes:
- name: backup
persistentVolumeClaim:
claimName: backup
containers:
- name: intranet
image: r.intra.logilab.fr/intranet/intranet
imagePullPolicy: Always
command: ["cubicweb-ctl", "db-dump", "intranet"]
envFrom:
- secretRef:
name: intranet-env
volumeMounts:
- name: backup
mountPath: /etc/cubicweb.d/intranet/backup
resources:
requests:
cpu: 50m
memory: 500Mi
Markdown is supported
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