-
Notifications
You must be signed in to change notification settings - Fork 207
/
Copy pathdoraemon.yml
162 lines (154 loc) · 3.57 KB
/
doraemon.yml
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
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: doraemon-api
name: doraemon-api
namespace: default
data:
app.conf: |-
appname = doraemon
httpport = 8080
runmode = dev
autorender = false
copyrequestbody = true
sessionon = true
EnableDocs = true
# mysql
DBName = "doraemon"
DBTns = "tcp(mysql-doraemon:3306)"
DBUser = "root"
DBPasswd = "root"
DBLoc = "Asia%2FShanghai"
DBConnTTL = 30
SmsUrl="http://smsurl:8000/api/v1/sms"
LanxinUrl="http://lanxinurl:8000/api/v1/lanxin/text"
CallUrl="http://callurl:8000/api/v1/lanxin/call"
DutyGroupUrl="http://dutygroupurl:8000/Api/getDutyUser"
BrokenUrl="http://brokenurl:8000/api/hosts/broken"
WebUrl="http://localhost:32000"
# oauth2
[auth.oauth2]
auth_url="https://oauth2/v1/authorize"
client_id="xxxxxxxxxxxx"
client_secret="xxxxxxxxxxxx"
token_url = "https://oauth2/v1/token"
api_url ="https://oauth2/v1/userinfo"
# ldap config
[auth.ldap]
enabled = false
ldap_url = ldap://127.0.0.1
ldap_search_dn = "cn=admin,dc=example,dc=com"
ldap_search_password = admin
ldap_base_dn = "dc=example,dc=com"
ldap_filter =
ldap_uid = cn
ldap_scope = 2
ldap_connection_timeout = 30
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: doraemon-ui
name: doraemon-ui
namespace: default
data:
config.js: |-
window.CONFIG = {
baseURL: 'http://nodeip:32000',
};
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: doraemon-web
labels:
app: doraemon-web
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: doraemon-web
template:
metadata:
labels:
app: doraemon-web
spec:
volumes:
- name: config
configMap:
name: doraemon-api
- name: ui-config
configMap:
name: doraemon-ui
items:
- key: config.js
path: config.js
containers:
- resources:
limits:
memory: 1Gi
cpu: '1'
requests:
memory: 1Gi
cpu: '0.5'
env: []
envFrom: []
imagePullPolicy: Always
name: alertgateway
image: '360cloud/alert-gateway:latest'
command:
- ./doraemon
volumeMounts:
- name: config
mountPath: /opt/doraemon/conf/
- resources:
limits:
memory: 1Gi
cpu: '1'
requests:
memory: 1Gi
cpu: '0.5'
env: []
envFrom: []
imagePullPolicy: Always
name: alertgateway-fe
image: '360cloud/doraemon-frontend:latest'
volumeMounts:
- name: ui-config
mountPath: /usr/local/openresty/nginx/html/config.js
subPath: config.js
- resources:
limits:
memory: 1Gi
cpu: '1'
requests:
memory: 1Gi
cpu: '0.5'
env: []
envFrom: []
imagePullPolicy: Always
name: ruleengine
image: '360cloud/rule-engine:latest'
args:
- --gateway.url=http://localhost:8080
- --log.level=info
---
apiVersion: v1
kind: Service
metadata:
labels:
app: doraemon-web
name: doraemon-web
namespace: default
spec:
type: NodePort
ports:
- nodePort: 32000
protocol: TCP
port: 8080
targetPort: 80
selector:
app: doraemon-web