-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-config.yaml
36 lines (34 loc) · 966 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-mysqlbackup
spec:
schedule: "3 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: webapp-mysqlbackup
image: ghcr.io/drakeapps/mysqlbackup-gdrive
imagePullPolicy: Always
env:
- name: MYSQL_USER
value: root
- name: MYSQL_PASS
valueFrom:
secretKeyRef:
name: mysql-pass
key: password
- name: MYSQL_HOST
value: webapp-mysql
- name: MYSQL_DB
value: webapp
- name: RCLONE_TOKEN
valueFrom:
secretKeyRef:
name: rclone-token
key: token
- name: DEST_DIR
value: /backups/k8s/db-backups/webapp/
restartPolicy: OnFailure