-
Notifications
You must be signed in to change notification settings - Fork 221
/
tis-console.yaml
171 lines (160 loc) · 3.79 KB
/
tis-console.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
# export KUBECONFIG=~/.kube/aliyun
apiVersion: v1
kind: Service
metadata:
name: tis-console-loadbalancer
spec:
ports:
- port: 8080
name: tis-console-8080
protocol: TCP
targetPort: tis-8080
selector:
app: tis-console
type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
name: tis-console-cluster-svc
spec:
ports:
- port: 8080
name: tis-console-8080
protocol: TCP
targetPort: tis-8080
- port: 56432
name: tis-console-grpc
protocol: TCP
targetPort: tis-grpc
selector:
app: tis-console
type: ClusterIP
---
#apiVersion: v1
#kind: PersistentVolume
#metadata:
# name: pv-oss
#spec:
# capacity:
# storage: 5Gi
# accessModes:
# - ReadWriteMany
# storageClassName: oss
# flexVolume:
# driver: "alicloud/oss"
# options:
# bucket: "incr-log"
# url: "oss-cn-hangzhou.aliyuncs.com"
# path: "/tis-pv"
# akId: ""
# akSecret: ""
# otherOpts: "-o max_stat_cache_size=0 -o allow_other"
#---
#kind: PersistentVolumeClaim
#apiVersion: v1
#metadata:
# name: tis-console-pvc-oss
#spec:
# storageClassName: oss
# accessModes:
# - ReadWriteMany
# resources:
# requests:
# storage: 5Gi
apiVersion: v1
kind: PersistentVolume
metadata:
name: csi-pv
labels:
alicloud-pvname: disk-pv
spec:
capacity:
storage: 20Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
csi:
driver: diskplugin.csi.alibabacloud.com
volumeHandle: "d-bp15tdr3q90sxxz2l0dz"
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: topology.diskplugin.csi.alibabacloud.com/zone
operator: In
values:
- "cn-hangzhou-k"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: disk-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
selector:
matchLabels:
alicloud-pvname: disk-pv
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tis-config
data:
config.properties: |-
project.name=TIS
runtime=daily
#tis.datasource.type=mysql
#tis.datasource.url=192.168.28.200
#tis.datasource.port=3306
#tis.datasource.username=root
#tis.datasource.password=123456
#tis.datasource.dbname=tis_console1
tis.datasource.type=derby
tis.datasource.dbname=tis_console_db
assemble.host=tis-console-cluster-svc.default
tis.host=tis-console-cluster-svc.default
---
# how to use aliyun pv: https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/mount-a-statically-provisioned-oss-volume?spm=a2c4g.11186623.0.0.39145057wGt7rB
# 使用 云盘:https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/use-a-statically-provisioned-disk-volume?spm=a2c4g.11186623.0.i5
apiVersion: v1
kind: ReplicationController
metadata:
name: tis-console
spec:
replicas: 1
selector:
app: tis-console
template:
metadata:
labels:
app: tis-console
spec:
containers:
- name: tis-console
volumeMounts:
- name: tis-config-volume
mountPath: /opt/app/tis-uber/tjs/conf/tis-web-config/
- name: tis-config-volume
mountPath: /opt/app/tis-uber/tis-assemble/conf/tis-web-config/
- name: tis-console-pvc
mountPath: "/opt/data"
image: registry.cn-hangzhou.aliyuncs.com/tis/tis-console:4.0.0.21
# command: [ "/bin/sh", "-c", "sleep 1000000" ]
ports:
- name: tis-8080
containerPort: 8080
- name: tis-grpc
containerPort: 56432
volumes:
- name: tis-config-volume
configMap:
name: tis-config
- name: tis-console-pvc
persistentVolumeClaim:
claimName: disk-pvc
---