-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathfuse-apicurito.yml
280 lines (280 loc) · 7.14 KB
/
fuse-apicurito.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
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: apicurito
labels:
app: apicurito
annotations:
openshift.io/display-name: "Red Hat Fuse Apicurito"
openshift.io/provider-display-name: "Red Hat, Inc."
description: "Design beautiful, functional APIs with zero coding, using a visual designer for OpenAPI documents."
tags: "fuse,apicurio,openapi,swagger,api"
iconClass: "icon-rh-integration"
version: "1.13"
message: |-
Apicurito is now deployed to https://${ROUTE_HOSTNAME}.
parameters:
- name: APP_VERSION
displayName: Application Version
required: true
value: "1.13"
description: The application version.
- name: IMAGE_STREAM_NAMESPACE
displayName: Image Stream Namespace
value: openshift
required: true
description: Namespace in which the Fuse image streams are installed. These image streams
are normally installed in the 'openshift' namespace. You should only need to modify
this if you've installed the image streams in a different namespace/project.
- name: ROUTE_HOSTNAME
description: The external hostname to access Apicurito
required: true
- name: CPU_REQUEST
displayName: CPU request
value: '0.2'
required: true
description: The amount of CPU to request for each container.
- name: MEMORY_REQUEST
displayName: Memory request
value: 64Mi
required: true
description: The amount of memory required for each container to run.
- name: CPU_LIMIT
displayName: CPU limit
value: '1.0'
required: true
description: The amount of CPU each container is limited to use.
- name: MEMORY_LIMIT
displayName: Memory limit
value: 256Mi
required: true
description: The amount of memory each container is limited to use.
objects:
#
# OpenShift resources need to run the apicurito-ui pod
#
- apiVersion: v1
kind: ConfigMap
metadata:
name: apicurito-ui-config
labels:
app: apicurito
data:
config.js: |
var ApicuritoConfig = {
"generators": [
{
"name":"Fuse Camel Project",
"url":"/api/v1/generate/camel-project.zip"
}
]
}
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: apicurito-ui
labels:
app: apicurito
component: apicurito-ui
spec:
replicas: 1
selector:
app: apicurito
component: apicurito-ui
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
app: apicurito
component: apicurito-ui
com.company: Red_Hat
rht.prod_name: Red_Hat_Integration
rht.prod_ver: "7.13.0"
rht.comp: apicurito-ui
rht.comp_ver: ${APP_VERSION}
spec:
containers:
- name: apicurito-ui
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: "/"
port: 8080
initialDelaySeconds: 30
readinessProbe:
httpGet:
path: "/"
port: 8080
initialDelaySeconds: 1
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /html/config
name: config-volume
resources:
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
volumes:
- name: config-volume
configMap:
name: apicurito-ui-config
triggers:
- imageChangeParams:
automatic: true
containerNames:
- apicurito-ui
from:
kind: ImageStreamTag
name: apicurito-ui:${APP_VERSION}
namespace: ${IMAGE_STREAM_NAMESPACE}
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
name: apicurito-ui
labels:
app: apicurito
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: apicurito
component: apicurito-ui
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: apicurito
annotations:
console.alpha.openshift.io/overview-app-route: "true"
name: apicurito
spec:
host: ${ROUTE_HOSTNAME}
tls:
termination: edge
to:
kind: Service
name: apicurito-ui
#
# OpenShift resources need to run the fuse-apicurito-generator pod
#
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: fuse-apicurito-generator
labels:
app: apicurito
component: fuse-apicurito-generator
spec:
replicas: 1
selector:
app: apicurito
component: fuse-apicurito-generator
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
app: apicurito
component: fuse-apicurito-generator
com.company: Red_Hat
rht.prod_name: Red_Hat_Integration
rht.prod_ver: "7.13.0"
rht.comp: fuse-apicurito-generator
rht.comp_ver: ${APP_VERSION}
spec:
containers:
- name: fuse-apicurito-generator
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
tcpSocket:
port: 8080
initialDelaySeconds: 180
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
tcpSocket:
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 9779
name: prometheus
protocol: TCP
- containerPort: 8778
name: jolokia
protocol: TCP
resources:
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
triggers:
- imageChangeParams:
automatic: true
containerNames:
- fuse-apicurito-generator
from:
kind: ImageStreamTag
name: fuse-apicurito-generator:${APP_VERSION}
namespace: ${IMAGE_STREAM_NAMESPACE}
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
name: fuse-apicurito-generator
labels:
app: apicurito
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: apicurito
component: fuse-apicurito-generator
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: apicurito
name: fuse-apicurito-generator
spec:
host: ${ROUTE_HOSTNAME}
path: /api/v1
tls:
termination: edge
to:
kind: Service
name: fuse-apicurito-generator