-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathk0s.yaml
More file actions
229 lines (229 loc) · 5.97 KB
/
k0s.yaml
File metadata and controls
229 lines (229 loc) · 5.97 KB
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
217
218
219
220
221
222
223
224
225
226
227
228
229
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: risingwave-console
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: risingwave-console
subjects:
- kind: ServiceAccount
name: risingwave-console
namespace: default
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
---
# PostgreSQL Database
apiVersion: apps/v1
kind: Deployment
metadata:
name: db
labels:
app: db
spec:
replicas: 1
selector:
matchLabels:
app: db
template:
metadata:
labels:
app: db
spec:
containers:
- name: postgres
image: postgres:latest
ports:
- containerPort: 5432
env:
- name: POSTGRES_PASSWORD
value: postgres
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_DB
value: postgres
---
apiVersion: v1
kind: Service
metadata:
name: db
spec:
type: NodePort
ports:
- port: 5432
targetPort: 5432
nodePort: 30432
selector:
app: db
---
# RisingWave Database
apiVersion: apps/v1
kind: Deployment
metadata:
name: rw-svc
labels:
app: rw-svc
spec:
replicas: 1
selector:
matchLabels:
app: rw-svc
template:
metadata:
labels:
app: rw-svc
spec:
containers:
- name: risingwave
image: risingwavelabs/risingwave:v2.3.2
ports:
- containerPort: 4566
- containerPort: 5690
- containerPort: 5691
- containerPort: 1250
volumeMounts:
- mountPath: /root/meta
name: rw-meta-store
- mountPath: /root/state_store
name: rw-data-store
command:
- /bin/sh
- -c
- |
/risingwave/bin/risingwave standalone --meta-opts=" \
--listen-addr 0.0.0.0:5690 \
--advertise-addr rw-svc:5690 \
--dashboard-host 0.0.0.0:5691 \
--prometheus-host 0.0.0.0:1250 \
--backend sqlite \
--sql-endpoint /root/meta/single_node.db \
--state-store hummock+fs:///root/state_store \
--data-directory hummock_001" \
--compute-opts=" \
--listen-addr 0.0.0.0:5688 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr rw-svc:5688 \
--async-stack-trace verbose \
--parallelism 4 \
--total-memory-bytes 2147483648 \
--role both \
--meta-address http://0.0.0.0:5690" \
--frontend-opts=" \
--listen-addr 0.0.0.0:4566 \
--advertise-addr rw-svc:4566 \
--prometheus-listener-addr 0.0.0.0:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=500000000" \
--compactor-opts=" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr rw-svc:6660 \
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=1000000000"
volumes:
- name: rw-meta-store
hostPath:
path: /opt/risingwave-console-dev/rw-meta-store
type: DirectoryOrCreate
- name: rw-data-store
hostPath:
path: /opt/risingwave-console-dev/rw-data-store
type: DirectoryOrCreate
---
apiVersion: v1
kind: Service
metadata:
name: rw-svc
spec:
type: NodePort
ports:
- name: frontend
port: 4566
targetPort: 4566
nodePort: 30566
- name: meta
port: 5690
targetPort: 5690
nodePort: 30690
- name: dashboard
port: 5691
targetPort: 5691
nodePort: 30691
selector:
app: rw-svc
---
# RisingWave Console
apiVersion: apps/v1
kind: Deployment
metadata:
name: risingwave-console
labels:
app: risingwave-console
spec:
replicas: 1
selector:
matchLabels:
app: risingwave-console
template:
metadata:
labels:
app: risingwave-console
spec:
serviceAccountName: risingwave-console
containers:
- name: console
image: risingwavelabs/risingwave-console:v0.4.5
volumeMounts:
- mountPath: /risingwave-console-data
name: risingwave-console-pv
- mountPath: /app/config.yaml
name: config
- mountPath: /app/init.yaml
name: init
env:
- name: RCONSOLE_SERVER_PG_DSN
value: postgres://postgres:postgres@db:5432/postgres
- name: RCONSOLE_SERVER_PORT
value: '8020'
- name: RCONSOLE_ROOT_PASSWORD
value: '123456'
- name: RCONSOLE_INIT
value: /app/init.yaml
- name: RCONSOLE_RISECTLDIR
value: /risingwave-console-data/risectl
- name: RCONSOLE_METRICSPORT
value: '9020'
ports:
- containerPort: 8020
volumes:
- name: risingwave-console-pv
hostPath:
path: /opt/risingwave-console-dev/risingwave-console-data
type: DirectoryOrCreate
- name: config
hostPath:
path: /opt/risingwave-console-dev/codebase/dev/config.yaml
type: FileOrCreate
- name: init
hostPath:
path: /opt/risingwave-console-dev/codebase/dev/init.yaml
type: FileOrCreate
---
apiVersion: v1
kind: Service
metadata:
name: risingwave-console-nodeport
spec:
type: NodePort
ports:
- name: console
port: 8020
targetPort: 8020
nodePort: 30020
selector:
app: risingwave-console