-
Notifications
You must be signed in to change notification settings - Fork 0
/
sts-nopvc.yaml
123 lines (123 loc) · 2.65 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
---
apiVersion: v1
kind: Service
metadata:
name: doris-stand
namespace: default
labels:
app: doris-stand
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
selector:
app: doris-stand
---
apiVersion: v1
kind: Service
metadata:
name: doris-stand-headless
labels:
app: doris-stand
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-stand
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: doris-stand
labels:
app: doris-stand
spec:
serviceName: doris-stand-headless
updateStrategy:
rollingUpdate: {}
type: RollingUpdate
replicas: 1
selector:
matchLabels:
app: doris-stand
template:
metadata:
labels:
app: doris-stand
spec:
hostNetwork: false
dnsPolicy: ClusterFirst
containers:
- name: doris-stand
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: standalone
image: dyrnq/doris:2.1.7
volumeMounts:
- mountPath: /opt/apache-doris/fe/doris-meta
name: volume-fe
- mountPath: /opt/apache-doris/be/storage
name: volume-be
ports:
- containerPort: 8030
protocol: TCP
- containerPort: 9020
protocol: TCP
- containerPort: 9030
protocol: TCP
- containerPort: 9010
protocol: TCP
volumes:
- name: volume-fe
emptyDir: {}
- name: volume-be
emptyDir: {}