From 99e6ff612863e40904ac3d95e717dacbaed3d82b Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 26 Nov 2024 15:17:01 +0100 Subject: [PATCH] Do not create the route as part of the build --- README.adoc | 34 +++++++++++++++++++++++ src/main/resources/application.properties | 14 ++++------ 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/README.adoc b/README.adoc index 32b3ecc..e51156c 100644 --- a/README.adoc +++ b/README.adoc @@ -234,6 +234,40 @@ Make sure to provide the names for the required config maps while building the i -Dquarkus.openshift.config-map-volumes.app-config.config-map-name= \ ---- +== Route configuration + +We are not adding a route as part of the build since setting the path is currently unsupported. +Create a route either with `oc` or through a UI using the OpenShift console. +Make sure to set the next spec properties: + +[source,yaml] +---- +spec: + host: your-host.smth + path: /path-to-use + to: + kind: Service + name: your-replicate-jira-service-name + port: + targetPort: http + tls: + termination: edge + insecureEdgeTerminationPolicy: Redirect + wildcardPolicy: None +---- + +Note that certificates are not provided explicitly. To fully enable https and finish route configuration +add the following annotations to the route: + +[source,yaml] +---- +# will mark the resource as such that certificates will be generated for it: +# see https://github.com/tnozicka/openshift-acme/#enabling-acme-certificates-for-your-object +kubernetes.io/tls-acme: 'true' +# Set the target to root so that the path `/path-to-use` is not passed to the service: +haproxy.router.openshift.io/rewrite-target: / +---- + == Management endpoints There are management endpoints to sync particular issues/comments. diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 46cd1f1..bbe0de7 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -47,15 +47,11 @@ quarkus.openshift.startup-probe.failure-threshold=48 # Declare the management port on the service quarkus.openshift.ports."management".container-port=9000 quarkus.openshift.ports."management".host-port=90 -# Add routes: -quarkus.openshift.route.host=infra.hibernate.org -quarkus.openshift.route.path=/replicate-jira -# Use a rewrite target so that the request go to the app root and the app handles the remaining path -# otherwise the app will end up receiving the path starting with `quarkus.openshift.route.path` (see ^) -# which it has no idea how to handle: -quarkus.openshift.route.annotations."haproxy.router.openshift.io/rewrite-target"=/ -quarkus.openshift.route.expose=true -quarkus.openshift.route.target-port=http +# Routes: +# we disable routes in the build and add them manually, since setting path is currently unavailable. +# See README for details on adding a route. +quarkus.openshift.route.expose=false + ## Route TLS configuration: quarkus.openshift.route.tls.termination=edge quarkus.openshift.route.tls.insecure-edge-termination-policy=Redirect