@@ -29,6 +29,9 @@ parameters:
29
29
generate : expression
30
30
from : " [a-zA-Z0-9]{16}"
31
31
required : true
32
+ - description : Target port for the created Route
33
+ name : TARGET_PORT
34
+ required : true
32
35
message : " ... The GitHub webhook secret is ${GITHUB_WEBHOOK_SECRET} ..."
33
36
# #############################################################################
34
37
# Following are the objects(imagestream and buildconfigs) for all the 3-stages
@@ -217,27 +220,32 @@ objects:
217
220
kind : ImageStreamTag
218
221
name : ${APPNAME}-ubimicro:latest # ImageStreamTag for registry.access.redhat.com/ubi9/ubi-micro
219
222
# #############################################################################
220
- # Deployment and Route object specs
221
- - apiVersion : apps/v1
222
- kind : Deployment
223
+ # DeploymentConfig and Route object specs
224
+ # DeploymentConfigs are discouraged, however the documentation sugggests to still
225
+ # use them if features are missing from Deployments, which in our case they are.
226
+ - apiVersion : apps.openshift.io/v1
227
+ kind : DeploymentConfig
223
228
metadata :
224
- name : ${APPNAME}-jlinked-app
229
+ name : ${APPNAME}-jlinked-app-deployment
230
+ annotations :
231
+ template.alpha.openshift.io/wait-for-ready : " true"
225
232
spec :
226
233
replicas : 1
227
234
selector :
228
235
matchLabels :
229
236
app : ${APPNAME}-jlinked-app
230
- template :
231
- metadata :
232
- labels :
233
- app : ${APPNAME}-jlinked-app
234
- spec :
235
- containers :
236
- - name : ${APPNAME}-jlinked-app-container
237
- image : ${APPNAME}-lightweight-image:latest
238
- imagePullPolicy : IfNotPresent
239
- ports :
240
- - containerPort : 8080
237
+ triggers :
238
+ - type : ConfigChange
239
+ - imageChangeParams :
240
+ automatic : true
241
+ containerNames :
242
+ - ${APPNAME}-jlinked-app-container
243
+ from :
244
+ kind : ImageStreamTag
245
+ name : ${APPNAME}-lightweight-image:latest
246
+ type : ImageChange
247
+ strategy :
248
+ type : Rolling
241
249
- apiVersion : v1
242
250
kind : Service
243
251
metadata :
@@ -257,3 +265,5 @@ objects:
257
265
to :
258
266
kind : Service
259
267
name : ${APPNAME}-jlinked-app-service
268
+ port :
269
+ targetPort : ${TARGET_PORT}
0 commit comments