-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup.yaml
More file actions
37 lines (36 loc) · 856 Bytes
/
Copy pathbackup.yaml
File metadata and controls
37 lines (36 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: postgres-backup
labels:
jobgroup: postgres-backup
spec:
# Backup the database every day at 12AM
# schedule: "0 0 0 ? * * *"
schedule: "* * * * *"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3
concurrencyPolicy: Forbid
jobTemplate:
metadata:
name: postgres-backup
labels:
jobgroup: postgres-backup
spec:
backoffLimit: 0
template:
metadata:
labels:
"db-postgresql-ha-client": "true"
spec:
containers:
- name: postgres-backup
image: ifine/backup:v2
imagePullPolicy: Always
envFrom:
- secretRef:
name: app-secrets
restartPolicy: Never
nodeSelector:
kubernetes.io/os: linux