-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeployment.yaml
93 lines (90 loc) · 2.33 KB
/
deployment.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ${STATEFUL_SET}
namespace: ${NAMESPACE}
spec:
serviceName: ${SERVICE}
selector:
matchLabels:
service: ${SERVICE}
template:
metadata:
labels:
service: ${SERVICE}
spec:
runtimeClassName: gvisor
nodeSelector:
cloud.google.com/gke-nodepool: apps
volumes:
- name: ${SERVICE_VOLUME}
persistentVolumeClaim:
claimName: ${SERVICE_VOLUME}
containers:
- name: codedx
image: ${CODEDX_IMAGE}
command: ['sh', '-c']
args:
- rm -f
/opt/codedx/codedx.props \
/opt/codedx/logback.xml &&
start.sh
env:
- name: DB_URL
value: jdbc:mysql://localhost/${DB_NAME}
- name: DB_DRIVER
value: com.mysql.jdbc.Driver
- name: DB_USER
value: ${DB_USER}
- name: SUPERUSER_NAME
value: admin
- name: JAVA_OPTS
value: -Xmx8000M
envFrom:
- secretRef:
name: ${SERVICE_SECRET}
ports:
- name: ${TARGET_PORT}
containerPort: 8080
readinessProbe:
httpGet:
path: /codedx/classpath/login-page.js
port: ${TARGET_PORT}
timeoutSeconds: 10
initialDelaySeconds: 360
volumeMounts:
- name: ${SERVICE_VOLUME}
mountPath: /opt/codedx
resources:
requests:
memory: 4500M
- name: codedx-db
image: mariadb:10.3
imagePullPolicy: Always
args:
- --optimizer_search_depth=0
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
- --lower_case_table_names=1
env:
- name: MYSQL_DATABASE
value: ${DB_NAME}
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: ${SERVICE_SECRET}
key: DB_ROOT_PASSWORD
- name: MYSQL_USER
value: ${DB_USER}
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: ${SERVICE_SECRET}
key: DB_PASSWORD
volumeMounts:
- name: ${SERVICE_VOLUME}
mountPath: /var/lib/mysql
subPath: mariadb
resources:
requests:
memory: 1500M