restore.yaml
3.31 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
apiVersion: batch/v1
kind: Job
metadata:
annotations:
helm.sh/hook: post-install
helm.sh/hook-weight: "-5"
helm.sh/hook-delete-policy: before-hook-creation
# annotations:
# helm.sh/hook: pre-install
# helm.sh/hook-delete-policy: before-hook-creation
# helm.sh/hook-weight: "-5"
name: backup-secrets-do-restore
spec:
template:
spec:
restartPolicy: Never
serviceAccountName: backup-secrets
containers:
- name: show-backup
command: ["/scripts/backup"]
args: ["show-backup"]
image: debian
volumeMounts:
- mountPath: /work-space
name: work-space
- mountPath: /scripts
name: scripts
initContainers:
- name: list-s3
command: ["/scripts/backup"]
args: ["list-s3"]
image: peakcom/s5cmd
volumeMounts:
- mountPath: /work-space
name: work-space
- mountPath: /config
name: config
- mountPath: /auth
name: auth
- mountPath: /scripts
name: scripts
- mountPath: /root/.aws/config
name: aws-config
subPath: config
- mountPath: /root/.aws/credentials
name: aws-credentials
subPath: credentials
- name: calculate-restore-s3
command: ["/scripts/backup"]
args: ["calculate-restore-s3"]
image: debian
volumeMounts:
- mountPath: /work-space
name: work-space
- mountPath: /config
name: config
- mountPath: /auth
name: auth
- mountPath: /scripts
name: scripts
- name: copy-from-s3
command: ["/scripts/backup"]
args: ["copy-from-s3"]
image: peakcom/s5cmd
volumeMounts:
- mountPath: /work-space
name: work-space
- mountPath: /config
name: config
- mountPath: /auth
name: auth
- mountPath: /scripts
name: scripts
- mountPath: /root/.aws/config
name: aws-config
subPath: config
- mountPath: /root/.aws/credentials
name: aws-credentials
subPath: credentials
- name: restore-secrets
command: ["/scripts/backup"]
args: ["restore-secrets"]
image: bitnami/kubectl
volumeMounts:
- mountPath: /work-space
name: work-space
- mountPath: /scripts
name: scripts
volumes:
- name: work-space
emptyDir: {}
- name: aws-config
configMap:
name: backup-secrets-config
items:
- key: config
path: config
- name: aws-credentials
secret:
secretName: backup-secrets-auth
items:
- key: credentials
path: credentials
- name: config
configMap:
name: backup-secrets-config
- name: auth
secret:
secretName: backup-secrets-auth
- name: scripts
configMap:
defaultMode: 0755
name: backup-secrets-scripts