Skip to content
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions templates/jlink/jlinked-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ parameters:
generate: expression
from: "[a-zA-Z0-9]{16}"
required: true
- description: Target port for the created Route
name: TARGET_PORT
required: true
message: "... The GitHub webhook secret is ${GITHUB_WEBHOOK_SECRET} ..."
##############################################################################
# Following are the objects(imagestream and buildconfigs) for all the 3-stages
Expand Down Expand Up @@ -216,3 +219,63 @@ objects:
from:
kind: ImageStreamTag
name: ${APPNAME}-ubimicro:latest # ImageStreamTag for registry.access.redhat.com/ubi9/ubi-micro
##############################################################################
# DeploymentConfig and Route object specs
# DeploymentConfigs are discouraged, however the documentation sugggests to still
# use them if features are missing from Deployments, which in our case they are.
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: ${APPNAME}-jlinked-app-deployment
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
spec:
replicas: 1
selector:
app: ${APPNAME}-jlinked-app
template:
metadata:
labels:
app: ${APPNAME}-jlinked-app
spec:
containers:
- name: ${APPNAME}-jlinked-app-container
image: >-
${APPNAME}-lightweight-image:latest
ports:
- containerPort: 8080
protocol: TCP
strategy:
type: Rolling
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${APPNAME}-jlinked-app-container
from:
kind: ImageStreamTag
name: '${APPNAME}-lightweight-image:latest'
namespace: default
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
name: ${APPNAME}-jlinked-app-service
spec:
selector:
app: ${APPNAME}-jlinked-app
ports:
- protocol: TCP
port: 80
targetPort: 8080
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: ${APPNAME}-jlinked-app-route
spec:
to:
kind: Service
name: ${APPNAME}-jlinked-app-service
port:
targetPort: ${TARGET_PORT}
Loading