Skip to content

Commit

Permalink
Do not create the route as part of the build
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Nov 26, 2024
1 parent e1f19fc commit 99bb1a8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
34 changes: 34 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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=<your-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.
Expand Down
14 changes: 5 additions & 9 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99bb1a8

Please sign in to comment.