-
Notifications
You must be signed in to change notification settings - Fork 0
/
reset-db.Job.yaml
44 lines (44 loc) · 1.04 KB
/
reset-db.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
apiVersion: batch/v1
kind: Job
metadata:
name: reset-db
namespace: kubeflow
spec:
parallelism: 1
completions: 1
ttlSecondsAfterFinished: 10
template:
metadata:
annotations:
"sidecar.istio.io/inject": "false"
spec:
containers:
- name: reset-db
image: mysql:8.0.26
command:
- mysql
- -u
- $(DBCONFIG_USER)
- -p$(DBCONFIG_PASSWORD)
- -h
- $(DBCONFIG_HOST_NAME)
- -e
- "drop database mlpipeline; drop database metadb; drop database cachedb;"
env:
- name: DBCONFIG_USER
valueFrom:
secretKeyRef:
key: username
name: mysql-secret
- name: DBCONFIG_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: mysql-secret
- name: DBCONFIG_HOST_NAME
valueFrom:
configMapKeyRef:
key: dbHost
name: pipeline-install-config
restartPolicy: Never
backoffLimit: 4