-
Notifications
You must be signed in to change notification settings - Fork 0
/
job.yml
48 lines (48 loc) · 1.33 KB
/
job.yml
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
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: backup-db
spec:
schedule: "@daily"
jobTemplate:
spec:
template:
spec:
containers:
- name: backup-db
image: ghcr.io/weaverize/git-backup-database:latest
env:
- name: DB_TYPE
value: postgres
- name: DB_PORT
value: "5432"
- name: DB_USER
valueFrom:
secretKeyRef:
name: db-credentials
key: username
- name: DB_PASS
valueFrom:
secretKeyRef:
name: db-credentials
key: password
- name: DB_HOST
value: localhost:5432
- name: DB_NAME
value: postgres
- name: GIT_URL
value: <path to repo>
- name: GIT_NAME
value: Weaverize Backup System
- name: GIT_EMAIL
value: dev@weaverize.com
volumeMounts:
- name: sshkey
mountPath: "/root/.ssh/"
readOnly: true
restartPolicy: OnFailure
volumes:
- name: sshkey
secret:
secretName: sshkey
defaultMode: 256