forked from canpb/DO280
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheap72-https-s2i.yaml
387 lines (387 loc) · 12.6 KB
/
eap72-https-s2i.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
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
apiVersion: template.openshift.io/v1
kind: Template
labels:
template: eap72-https-s2i
xpaas: 1.0.0
message: 'A new EAP based application with SSL support has been created in your project.
Please be sure to create the following secrets: "${HTTPS_SECRET}" containing the
${HTTPS_KEYSTORE} file used for serving secure content; "${JGROUPS_ENCRYPT_SECRET}"
containing the ${JGROUPS_ENCRYPT_KEYSTORE} file used for securing JGroups communications.'
metadata:
annotations:
description: An example Red Hat JBoss EAP 7 application configured with secure
communication using HTTPS. For more information about using this template, see
https://github.com/jboss-container-images/jboss-eap-7-openshift-image/blob/eap72/README.adoc
iconClass: icon-eap
openshift.io/display-name: JBoss EAP 7.2 with passthrough TLS
openshift.io/provider-display-name: Red Hat, Inc.
samples.operator.openshift.io/version: 4.2.12
tags: eap,javaee,java,jboss
template.openshift.io/documentation-url: https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/
template.openshift.io/long-description: This template defines resources needed
to develop a Red Hat JBoss Enterprise Application Platform 7.2 application,
including a build configuration, application deployment configuration and secure
communication using passthrough TLS.
template.openshift.io/support-url: https://access.redhat.com
version: 1.0.0
creationTimestamp: "2020-06-26T17:20:53Z"
labels:
samples.operator.openshift.io/managed: "true"
name: eap72-https-s2i
namespace: openshift
resourceVersion: "7858"
selfLink: /apis/template.openshift.io/v1/namespaces/openshift/templates/eap72-https-s2i
uid: 63c93a98-b7d1-11ea-a2fb-0a580a800018
objects:
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The web server's http port.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
ports:
- port: 8080
targetPort: 8080
selector:
deploymentConfig: ${APPLICATION_NAME}
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The web server's https port.
labels:
application: ${APPLICATION_NAME}
name: secure-${APPLICATION_NAME}
spec:
ports:
- port: 8443
targetPort: 8443
selector:
deploymentConfig: ${APPLICATION_NAME}
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The JGroups ping port for clustering.
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-ping
spec:
clusterIP: None
ports:
- name: ping
port: 8888
publishNotReadyAddresses: true
selector:
deploymentConfig: ${APPLICATION_NAME}
- apiVersion: v1
id: ${APPLICATION_NAME}-http
kind: Route
metadata:
annotations:
description: Route for application's http service.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
to:
name: ${APPLICATION_NAME}
- apiVersion: v1
id: ${APPLICATION_NAME}-https
kind: Route
metadata:
annotations:
description: Route for application's https service.
labels:
application: ${APPLICATION_NAME}
name: secure-${APPLICATION_NAME}
spec:
host: ${HOSTNAME_HTTPS}
tls:
termination: passthrough
to:
name: secure-${APPLICATION_NAME}
- apiVersion: v1
kind: ImageStream
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
output:
to:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
source:
contextDir: ${CONTEXT_DIR}
git:
ref: ${SOURCE_REPOSITORY_REF}
uri: ${SOURCE_REPOSITORY_URL}
type: Git
strategy:
sourceStrategy:
env:
- name: MAVEN_MIRROR_URL
value: ${MAVEN_MIRROR_URL}
- name: MAVEN_ARGS_APPEND
value: ${MAVEN_ARGS_APPEND}
- name: ARTIFACT_DIR
value: ${ARTIFACT_DIR}
forcePull: true
from:
kind: ImageStreamTag
name: jboss-eap72-openshift:1.0
namespace: ${IMAGE_STREAM_NAMESPACE}
incremental: true
type: Source
triggers:
- github:
secret: ${GITHUB_WEBHOOK_SECRET}
type: GitHub
- generic:
secret: ${GENERIC_WEBHOOK_SECRET}
type: Generic
- imageChange: {}
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
replicas: 1
selector:
deploymentConfig: ${APPLICATION_NAME}
strategy:
type: Recreate
template:
metadata:
labels:
application: ${APPLICATION_NAME}
deploymentConfig: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
containers:
- env:
- name: JGROUPS_PING_PROTOCOL
value: dns.DNS_PING
- name: OPENSHIFT_DNS_PING_SERVICE_NAME
value: ${APPLICATION_NAME}-ping
- name: OPENSHIFT_DNS_PING_SERVICE_PORT
value: "8888"
- name: HTTPS_KEYSTORE_DIR
value: /etc/eap-secret-volume
- name: HTTPS_KEYSTORE
value: ${HTTPS_KEYSTORE}
- name: HTTPS_KEYSTORE_TYPE
value: ${HTTPS_KEYSTORE_TYPE}
- name: HTTPS_NAME
value: ${HTTPS_NAME}
- name: HTTPS_PASSWORD
value: ${HTTPS_PASSWORD}
- name: MQ_CLUSTER_PASSWORD
value: ${MQ_CLUSTER_PASSWORD}
- name: MQ_QUEUES
value: ${MQ_QUEUES}
- name: MQ_TOPICS
value: ${MQ_TOPICS}
- name: JGROUPS_ENCRYPT_SECRET
value: ${JGROUPS_ENCRYPT_SECRET}
- name: JGROUPS_ENCRYPT_KEYSTORE_DIR
value: /etc/jgroups-encrypt-secret-volume
- name: JGROUPS_ENCRYPT_KEYSTORE
value: ${JGROUPS_ENCRYPT_KEYSTORE}
- name: JGROUPS_ENCRYPT_NAME
value: ${JGROUPS_ENCRYPT_NAME}
- name: JGROUPS_ENCRYPT_PASSWORD
value: ${JGROUPS_ENCRYPT_PASSWORD}
- name: JGROUPS_CLUSTER_PASSWORD
value: ${JGROUPS_CLUSTER_PASSWORD}
- name: AUTO_DEPLOY_EXPLODED
value: ${AUTO_DEPLOY_EXPLODED}
image: ${APPLICATION_NAME}
imagePullPolicy: Always
livenessProbe:
exec:
command:
- /bin/bash
- -c
- /opt/eap/bin/livenessProbe.sh
initialDelaySeconds: 60
name: ${APPLICATION_NAME}
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 8443
name: https
protocol: TCP
- containerPort: 8888
name: ping
protocol: TCP
readinessProbe:
exec:
command:
- /bin/bash
- -c
- /opt/eap/bin/readinessProbe.sh
resources:
limits:
memory: ${MEMORY_LIMIT}
volumeMounts:
- mountPath: /etc/eap-secret-volume
name: eap-keystore-volume
readOnly: true
- mountPath: /etc/jgroups-encrypt-secret-volume
name: eap-jgroups-keystore-volume
readOnly: true
terminationGracePeriodSeconds: 75
volumes:
- name: eap-keystore-volume
secret:
secretName: ${HTTPS_SECRET}
- name: eap-jgroups-keystore-volume
secret:
secretName: ${JGROUPS_ENCRYPT_SECRET}
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}
from:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
type: ImageChange
- type: ConfigChange
parameters:
- description: The name for the application.
displayName: Application Name
name: APPLICATION_NAME
required: true
value: eap-app
- description: 'Custom hostname for https service route. Leave blank for default
hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>'
displayName: Custom https Route Hostname
name: HOSTNAME_HTTPS
- description: Git source URI for application
displayName: Git Repository URL
name: SOURCE_REPOSITORY_URL
required: true
value: https://github.com/jboss-developer/jboss-eap-quickstarts.git
- description: Git branch/tag reference
displayName: Git Reference
name: SOURCE_REPOSITORY_REF
value: openshift
- description: Path within Git project to build; empty for root project directory.
displayName: Context Directory
name: CONTEXT_DIR
value: kitchensink
- description: Queue names, separated by commas. These queues will be automatically
created when the broker starts. Also, they will be made accessible as JNDI resources
in EAP. Note that all queues used by the application *must* be specified here
in order to be created automatically on the remote AMQ broker.
displayName: Queues
name: MQ_QUEUES
- description: Topic names, separated by commas. These topics will be automatically
created when the broker starts. Also, they will be made accessible as JNDI resources
in EAP. Note that all topics used by the application *must* be specified here
in order to be created automatically on the remote AMQ broker.
displayName: Topics
name: MQ_TOPICS
- description: The name of the secret containing the keystore file
displayName: Server Keystore Secret Name
name: HTTPS_SECRET
required: true
value: eap7-app-secret
- description: The name of the keystore file within the secret
displayName: Server Keystore Filename
name: HTTPS_KEYSTORE
value: keystore.jks
- description: The type of the keystore file (JKS or JCEKS)
displayName: Server Keystore Type
name: HTTPS_KEYSTORE_TYPE
- description: The name associated with the server certificate
displayName: Server Certificate Name
name: HTTPS_NAME
- description: The password for the keystore and certificate
displayName: Server Keystore Password
name: HTTPS_PASSWORD
- description: AMQ cluster admin password
displayName: AMQ cluster password
from: '[a-zA-Z0-9]{8}'
generate: expression
name: MQ_CLUSTER_PASSWORD
required: true
- description: GitHub trigger secret
displayName: Github Webhook Secret
from: '[a-zA-Z0-9]{8}'
generate: expression
name: GITHUB_WEBHOOK_SECRET
required: true
- description: Generic build trigger secret
displayName: Generic Webhook Secret
from: '[a-zA-Z0-9]{8}'
generate: expression
name: GENERIC_WEBHOOK_SECRET
required: true
- description: Namespace in which the ImageStreams for Red Hat Middleware images are
installed. These ImageStreams are normally installed in the openshift namespace.
You should only need to modify this if you've installed the ImageStreams in a
different namespace/project.
displayName: ImageStream Namespace
name: IMAGE_STREAM_NAMESPACE
required: true
value: openshift
- description: The name of the secret containing the keystore file
displayName: JGroups Secret Name
name: JGROUPS_ENCRYPT_SECRET
value: eap7-app-secret
- description: The name of the keystore file within the secret
displayName: JGroups Keystore Filename
name: JGROUPS_ENCRYPT_KEYSTORE
value: jgroups.jceks
- description: The name associated with the server certificate
displayName: JGroups Certificate Name
name: JGROUPS_ENCRYPT_NAME
- description: The password for the keystore and certificate
displayName: JGroups Keystore Password
name: JGROUPS_ENCRYPT_PASSWORD
- description: JGroups cluster password
displayName: JGroups Cluster Password
from: '[a-zA-Z0-9]{8}'
generate: expression
name: JGROUPS_CLUSTER_PASSWORD
required: true
- description: Controls whether exploded deployment content should be automatically
deployed
displayName: Deploy Exploded Archives
name: AUTO_DEPLOY_EXPLODED
value: "false"
- description: Maven mirror to use for S2I builds
displayName: Maven mirror URL
name: MAVEN_MIRROR_URL
- description: Maven additional arguments to use for S2I builds
displayName: Maven Additional Arguments
name: MAVEN_ARGS_APPEND
value: -Dcom.redhat.xpaas.repo.jbossorg
- description: List of directories from which archives will be copied into the deployment
folder. If unspecified, all archives in /target will be copied.
name: ARTIFACT_DIR
- description: Container memory limit
name: MEMORY_LIMIT
value: 1Gi