forked from apache/incubator-devlake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-deploy.yaml
216 lines (210 loc) · 3.96 KB
/
k8s-deploy.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
---
apiVersion: v1
kind: Namespace
metadata:
name: devlake
---
apiVersion: v1
kind: ConfigMap
metadata:
name: devlake-config
namespace: devlake
data:
MYSQL_USER: merico
MYSQL_PASSWORD: merico
MYSQL_DATABASE: lake
MYSQL_ROOT_PASSWORD: admin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
namespace: devlake
labels:
app: mysql
spec:
replicas: 1
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql:8.0.26
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3306
envFrom:
- configMapRef:
name: devlake-config
volumeMounts:
- mountPath: /var/lib/mysql
name: data
volumes:
- name: data
hostPath:
path: /var/lib/mysql
---
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: devlake
spec:
selector:
app: mysql
ports:
- protocol: TCP
port: 3306
targetPort: 3306
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: devlake
labels:
app: grafana
spec:
replicas: 1
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: mericodev/grafana:latest
ports:
- containerPort: 3000
envFrom:
- configMapRef:
name: devlake-config
env:
- name: GF_USERS_ALLOW_SIGN_UP
value: 'false'
- name: GF_DASHBOARDS_JSON_ENABLED
value: 'true'
- name: GF_LIVE_ALLOWED_ORIGINS
value: '*'
- name: MYSQL_URL
value: mysql:3306
---
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: devlake
spec:
type: NodePort
selector:
app: grafana
ports:
- protocol: TCP
port: 3000
targetPort: 3000
nodePort: 30002
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: config-ui
namespace: devlake
labels:
app: config-ui
spec:
replicas: 1
selector:
matchLabels:
app: config-ui
template:
metadata:
labels:
app: config-ui
spec:
containers:
- name: config-ui
image: mericodev/config-ui:latest
ports:
- containerPort: 80
envFrom:
- configMapRef:
name: devlake-config
env:
- name: DEVLAKE_ENDPOINT
value: devlake.devlake.svc.cluster.local:8080
- name: GRAFANA_ENDPOINT
value: http://grafana-on-yourdomain.example.com
#- name: ADMIN_USER
#value: devlake
#- name: ADMIN_PASS
#value: merico
---
apiVersion: v1
kind: Service
metadata:
name: config-ui
namespace: devlake
spec:
type: NodePort
selector:
app: config-ui
ports:
- protocol: TCP
port: 4000
targetPort: 80
nodePort: 30004
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: devlake
namespace: devlake
labels:
app: devlake
spec:
replicas: 1
selector:
matchLabels:
app: devlake
template:
metadata:
labels:
app: devlake
spec:
containers:
- name: devlake
image: mericodev/lake:latest
ports:
- containerPort: 8080
env:
- name: DB_URL
value: 'mysql://merico:merico@mysql:3306/lake?charset=utf8mb4&parseTime=True'
volumeMounts:
- name: config
mountPath: "/app/.env"
volumes:
- name: config
hostPath:
path: /var/lib/devlake/env
type: FileOrCreate
---
apiVersion: v1
kind: Service
metadata:
name: devlake
namespace: devlake
spec:
selector:
app: devlake
ports:
- protocol: TCP
port: 8080
targetPort: 8080