-
Notifications
You must be signed in to change notification settings - Fork 0
/
job.yaml
28 lines (28 loc) · 816 Bytes
/
job.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
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: mongo-backup
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
spec:
volumes:
- name: google-cloud-key
secret:
secretName: gcs-key
containers:
- name: lgt-mongo-backup
image: gcr.io/lead-tool-generator/lgt-mongo-backup-service:latest
volumeMounts:
- name: google-cloud-key
mountPath: /var/secrets/google
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
- name: MONGO_URI
value: mongodb://10.59.242.190:27017/
- name: BUCKET_NAME
value: lgt_mongo_backups
restartPolicy: OnFailure