-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsts-nopvc.yaml
248 lines (248 loc) · 5.79 KB
/
sts-nopvc.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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
---
apiVersion: v1
kind: Service
metadata:
name: doris-fe
namespace: default
labels:
app: doris-fe
spec:
# The following adds session affinity
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 28800
type: NodePort
ports:
- name: http
port: 8030
protocol: TCP
targetPort: 8030
nodePort: 32130
- name: mysql
port: 9030
protocol: TCP
targetPort: 9030
nodePort: 32230
# - name: thrift-rpc
# port: 9020
# protocol: TCP
# targetPort: 9020
# nodePort: 32220
# - name: edit-log
# port: 9010
# protocol: TCP
# targetPort: 9010
# nodePort: 32210
selector:
app: doris-fe
---
apiVersion: v1
kind: Service
metadata:
name: doris-fe-headless
labels:
app: doris-fe
spec:
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: thrift-rpc
port: 9020
protocol: TCP
targetPort: 9020
- name: mysql
port: 9030
protocol: TCP
targetPort: 9030
- name: edit-log
port: 9010
protocol: TCP
targetPort: 9010
selector:
app: doris-fe
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: doris-fe
labels:
app: doris-fe
spec:
serviceName: doris-fe-headless
updateStrategy:
rollingUpdate: {}
type: RollingUpdate
replicas: 3
selector:
matchLabels:
app: doris-fe
template:
metadata:
labels:
app: doris-fe
spec:
hostNetwork: false
dnsPolicy: ClusterFirst
containers:
- name: doris-fe
env:
- name: HOST_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: TZ
value: Asia/Shanghai
- name: RUN_MODE
value: FE
- name: FE_SERVERS
value: fe1:doris-fe-0.doris-fe-headless.default.svc.cluster.local:9010,fe2:doris-fe-1.doris-fe-headless.default.svc.cluster.local:9010,fe3:doris-fe-2.doris-fe-headless.default.svc.cluster.local:9010
# doris-fe-0.doris-fe-headless.default.svc.cluster.local
# doris-fe-1.doris-fe-headless.default.svc.cluster.local
# doris-fe-1.doris-fe-headless.default.svc.cluster.local
image: dyrnq/doris:2.1.7
volumeMounts:
- mountPath: /opt/apache-doris/fe/doris-meta
name: volume-fe
ports:
- containerPort: 8030
protocol: TCP
- containerPort: 9020
protocol: TCP
- containerPort: 9030
protocol: TCP
- containerPort: 9010
protocol: TCP
volumes:
- name: volume-fe
emptyDir: {}
# volumeClaimTemplates:
# - metadata:
# name: volume-fe
# spec:
# accessModes: [ "ReadWriteOnce" ]
# storageClassName: "local"
# resources:
# requests:
# storage: 5Gi
---
apiVersion: v1
kind: Service
metadata:
name: doris-be-headless
labels:
app: doris-be
spec:
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: thrift-rpc
port: 9060
protocol: TCP
targetPort: 9060
- name: heartbeat
port: 9050
protocol: TCP
targetPort: 9050
- name: web
port: 8040
protocol: TCP
targetPort: 8040
- name: brpc
port: 8060
protocol: TCP
targetPort: 8060
selector:
app: doris-be
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: doris-be
labels:
app: doris-be
spec:
serviceName: doris-be-headless
replicas: 3
selector:
matchLabels:
app: doris-be
template:
metadata:
labels:
app: doris-be
spec:
hostNetwork: false
dnsPolicy: ClusterFirst
terminationGracePeriodSeconds: 120
containers:
- name: doris-be
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: TZ
value: Asia/Shanghai
- name: RUN_MODE
value: BE
- name: FE_MASTER_IP
value: doris-fe-0.doris-fe-headless.default.svc.cluster.local
- name: FE_MASTER_PORT
value: "9030"
- name: BE_IP
value: $(POD_NAME).doris-be-headless.$(NAMESPACE).svc.cluster.local
- name: BE_PORT
value: "9050"
image: dyrnq/doris:2.1.7
volumeMounts:
- mountPath: /opt/apache-doris/be/storage
name: volume-be
ports:
- containerPort: 9060
protocol: TCP
- containerPort: 9050
protocol: TCP
- containerPort: 8040
protocol: TCP
- containerPort: 9050
protocol: TCP
- containerPort: 8060
protocol: TCP
volumes:
- name: volume-be
emptyDir: {}
# volumeClaimTemplates:
# - metadata:
# name: volume-be
# spec:
# accessModes: [ "ReadWriteOnce" ]
# storageClassName: "local"
# resources:
# requests:
# storage: 10Gi