-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup-cronjob.yaml
48 lines (48 loc) · 1.31 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
apiVersion: batch/v1
kind: CronJob
metadata:
name: etcd-backup
namespace: 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/kubernetes-etcd-backup:main
imagePullPolicy: Always
name: etcd-backup
resources:
requests:
cpu: 500m
memory: 128Mi
limits:
cpu: 1000m
memory: 512Mi
envFrom:
- configMapRef:
name: backup-config
volumeMounts:
- name: volume-backup
mountPath: /backup
- name: etcd-peer-tls
mountPath: /etc/kubernetes/pki/etcd-peer
- name: etcd-server-ca
mountPath: /etc/kubernetes/pki/etcd-ca
restartPolicy: Never
volumes:
- name: volume-backup
persistentVolumeClaim:
claimName: etcd-backup-pvc
- name: etcd-peer-tls
secret:
secretName: etcd-peer-tls
- name: etcd-server-ca
secret:
secretName: etcd-server-ca