From 8d6cfea7883eeaad38d316aa4381d42a5d32f8de Mon Sep 17 00:00:00 2001 From: jmatsuok Date: Mon, 18 Nov 2024 19:21:25 -0500 Subject: [PATCH] Add ports to readme, fix Service --- templates/jlink/README.md | 4 ++++ templates/jlink/jlinked-app.yaml | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/jlink/README.md b/templates/jlink/README.md index 8026ef5f..6c3f805e 100644 --- a/templates/jlink/README.md +++ b/templates/jlink/README.md @@ -57,6 +57,8 @@ Some suitable test values for the parameters are * REF: master * CONTEXT_DIR: quarkus-quickstarts/getting-started-3.9.2-uberjar * APPNAME: quarkus-quickstart + * TARGET_PORT: 8080 + * SERVICE_PORT: 8080 oc process \ -p JDK_VERSION=17 \ @@ -64,6 +66,8 @@ Some suitable test values for the parameters are -p REF=master \ -p CONTEXT_DIR=quarkus-quickstarts/getting-started-3.9.2-uberjar \ -p APPNAME=quarkus-quickstart \ + -p TARGET_PORT=8080 \ + -p SERVICE_PORT=8080 \ templates/jlink-app-template \ | oc create -f - diff --git a/templates/jlink/jlinked-app.yaml b/templates/jlink/jlinked-app.yaml index 6622bdc5..ab2ce72a 100644 --- a/templates/jlink/jlinked-app.yaml +++ b/templates/jlink/jlinked-app.yaml @@ -31,6 +31,11 @@ parameters: required: true - description: Target port for the created Route name: TARGET_PORT + value: "8080" + required: true +- description: Port for the created Service to listen on + name: SERVICE_PORT + value: "8181" required: true message: "... The GitHub webhook secret is ${GITHUB_WEBHOOK_SECRET} ..." ############################################################################## @@ -267,8 +272,9 @@ objects: app: ${APPNAME}-jlinked-app ports: - protocol: TCP - port: 80 - targetPort: 8080 + name: target-${TARGET_PORT}-tcp + port: ${{SERVICE_PORT}} + targetPort: ${{TARGET_PORT}} - apiVersion: route.openshift.io/v1 kind: Route metadata: