-
Notifications
You must be signed in to change notification settings - Fork 2
/
backup_v1alpha1_mongodbbackupplan.yaml
50 lines (50 loc) · 1.47 KB
/
backup_v1alpha1_mongodbbackupplan.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
apiVersion: backup.finleap.cloud/v1alpha1
kind: MongoDBBackupPlan
metadata:
name: my-mongodb-backup
spec:
schedule: "0 22 * * *"
activeDeadlineSeconds: 3600
retention: 3
uri: "$MONGODB_URI"
pushgateway:
url: my-pushgateway:9102
destination:
s3:
endpoint: my-s3:9000
bucket: my-mongodbbackup
useSSL: true
accessKeyID: $S3_ACCESS_KEY_ID
secretAccessKey: $S3_SECRET_ACCESS_KEY
encryptionKey: $S3_ENCRYPTION_KEY
env:
- name: MONGODB_USERNAME
value: myuser
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef:
key: mongodb-password
name: my-mongodb-credentials
- name: MONGODB_DATABASE
value: mydatabase
- name: MONGODB_HOSTS
value: my-mongodb-primary-0.my-mongodb-headless:27017,my-mongodb-secondary-0.my-mongodb-headless:27017,my-mongodb-secondary-1.my-mongodb-headless:27017
- name: MONGODB_OPTIONS
value: ?replicaSet=rs0
- name: MONGODB_URI
value: mongodb://$(MONGODB_USERNAME):$(MONGODB_PASSWORD)@$(MONGODB_HOSTS)/$(MONGODB_DATABASE)$(MONGODB_OPTIONS)
- name: S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: my-s3-credentials
key: S3_ACCESS_KEY_ID
- name: S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: my-s3-credentials
key: S3_SECRET_ACCESS_KEY
- name: S3_ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: my-s3-credentials
key: S3_ENCRYPTION_KEY