backup.yaml
2.76 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
apiVersion: batch/v1
kind: CronJob
metadata:
name: backup-secrets-do-backup
annotations:
helm.sh/hook: post-install,post-upgrade
spec:
schedule: "13 * * * *"
startingDeadlineSeconds: 3600
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 10
failedJobsHistoryLimit: 10
jobTemplate:
spec:
template:
spec:
serviceAccountName: backup-secrets
restartPolicy: OnFailure
volumes:
- name: work-space
emptyDir: {}
- name: config
configMap:
name: backup-secrets-config
- name: auth
secret:
secretName: backup-secrets-auth
- name: scripts
configMap:
name: backup-secrets-scripts
defaultMode: 0755
initContainers:
- name: list-s3
image: peakcom/s5cmd
command: ["/scripts/backup"]
args: ["list-s3"]
volumeMounts:
- name: work-space
mountPath: /work-space
- name: config
mountPath: /config
- name: auth
mountPath: /auth
- name: scripts
mountPath: /scripts
- name: calculate-delete-s3
image: debian
command: ["/scripts/backup"]
args: ["calculate-delete-s3"]
volumeMounts:
- name: work-space
mountPath: /work-space
- name: config
mountPath: /config
- name: scripts
mountPath: /scripts
- name: create-secrets-tarball
image: bitnami/kubectl
command: ["/scripts/backup"]
args: ["create-secrets-tarball"]
volumeMounts:
- name: work-space
mountPath: /work-space
- name: scripts
mountPath: /scripts
- name: copy-to-s3
image: peakcom/s5cmd
command: ["/scripts/backup"]
args: ["copy-to-s3"]
volumeMounts:
- name: work-space
mountPath: /work-space
- name: config
mountPath: /config
- name: auth
mountPath: /auth
- name: scripts
mountPath: /scripts
containers:
- name: show-backup
image: debian
command: ["/scripts/backup"]
args: ["show-backup"]
volumeMounts:
- name: work-space
mountPath: /work-space
- name: scripts
mountPath: /scripts