-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-config.yaml
36 lines (34 loc) · 993 Bytes
/
k8s-config.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
apiVersion: batch/v1
kind: CronJob
metadata:
name: webapp-postgresbackup
spec:
schedule: "3 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: webapp-postgresbackup
image: ghcr.io/drakeapps/postgresbackup-gdrive
imagePullPolicy: Always
env:
- name: POSTGRES_USER
value: root
- name: POSTGRES_PASS
valueFrom:
secretKeyRef:
name: postgres-pass
key: password
- name: POSTGRES_HOST
value: webapp-postgres
- name: POSTGRES_DB
value: webapp
- name: RCLONE_TOKEN
valueFrom:
secretKeyRef:
name: rclone-token
key: token
- name: DEST_DIR
value: /backups/k8s/db-backups/webapp/
restartPolicy: OnFailure