-
Notifications
You must be signed in to change notification settings - Fork 1
/
rethinkdb_manual_restore.yaml
105 lines (105 loc) · 3.02 KB
/
rethinkdb_manual_restore.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
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
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: rethinkdb
name: rethinkdb
spec:
serviceName: rethinkdb
replicas: 1
selector:
matchLabels:
app: rethinkdb
template:
metadata:
labels:
app: rethinkdb
spec:
containers:
- image: rethinkdb:2.4.0
name: backup-restore-sidecar
command:
- tail
- -f
- /etc/os-release
env:
- name: BACKUP_RESTORE_SIDECAR_GCP_PROJECT
valueFrom:
secretKeyRef:
key: projectID
name: backup-restore-sidecar-backup-provider-config
- name: BACKUP_RESTORE_SIDECAR_GCP_BUCKET_NAME
valueFrom:
secretKeyRef:
key: bucketName
name: backup-restore-sidecar-backup-provider-config
- name: BACKUP_RESTORE_SIDECAR_GCP_BUCKET_LOCATION
valueFrom:
secretKeyRef:
key: bucketLocation
name: backup-restore-sidecar-backup-provider-config
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /gcp/credentials/serviceaccount.json
volumeMounts:
- name: rethinkdb
mountPath: /data
- name: rethinkdb-credentials
mountPath: /rethinkdb-secret
- name: backup-restore-sidecar-config
mountPath: /etc/backup-restore-sidecar
- name: bin-provision
subPath: backup-restore-sidecar
mountPath: /usr/local/bin/backup-restore-sidecar
- name: bin-provision
subPath: rethinkdb-dump
mountPath: /usr/local/bin/rethinkdb-dump
- name: bin-provision
subPath: rethinkdb-restore
mountPath: /usr/local/bin/rethinkdb-restore
- name: gcp-credentials
mountPath: /gcp/credentials
readOnly: true
initContainers:
- name: backup-restore-sidecar-provider
image: ghcr.io/metal-stack/backup-restore-sidecar:latest
imagePullPolicy: IfNotPresent
command:
- cp
- /backup-restore-sidecar
- /rethinkdb/rethinkdb-dump
- /rethinkdb/rethinkdb-restore
- /bin-provision
volumeMounts:
- name: bin-provision
mountPath: /bin-provision
volumes:
- name: rethinkdb
persistentVolumeClaim:
claimName: rethinkdb
- name: rethinkdb-credentials
secret:
secretName: rethinkdb
items:
- key: rethinkdb-password
path: rethinkdb-password.txt
- name: backup-restore-sidecar-config
configMap:
name: backup-restore-sidecar-config-rethinkdb
- name: gcp-credentials
secret:
secretName: backup-restore-sidecar-backup-provider-config
items:
- key: serviceaccount.json
path: serviceaccount.json
- name: bin-provision
emptyDir: {}
volumeClaimTemplates:
- metadata:
name: rethinkdb
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi