-
Notifications
You must be signed in to change notification settings - Fork 18
/
backup-cronjob.yaml
55 lines (55 loc) · 1.46 KB
/
backup-cronjob.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: etcd-backup
spec:
schedule: "0 0 * * *"
startingDeadlineSeconds: 600
jobTemplate:
spec:
backoffLimit: 0
template:
spec:
containers:
- command:
- /bin/sh
- /usr/local/bin/backup.sh
image: ghcr.io/adfinis/openshift-etcd-backup
imagePullPolicy: Always
name: backup-etcd
resources:
requests:
cpu: 500m
memory: 128Mi
limits:
cpu: 1000m
memory: 512Mi
envFrom:
- configMapRef:
name: backup-config
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /host
name: host
- name: volume-backup
mountPath: /backup
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
hostNetwork: true
hostPID: true
serviceAccountName: etcd-backup
restartPolicy: Never
dnsPolicy: ClusterFirst
volumes:
- hostPath:
path: /
type: Directory
name: host
- name: volume-backup
persistentVolumeClaim:
claimName: etcd-backup-pvc