quarkus: configMap configured in quarkus.openshift properties does not get picked up by Quarkus application

Describe the bug configMap configured in quarkus.openshift according to Quarkus - Deploying on OpenShift does not get properly recognised by a Quarkus application. This approach worked in 1.7, therefore this is a breaking change.

With Quarkus 1.7, using the properties from docs was sufficient for a RESTful Quarkus application to pick up configMaps:

quarkus.openshift.config-map-volumes.app-config.config-map-name=app-config
quarkus.openshift.mounts.app-config.path=/deployments/config

It seems that with Quarkus 1.11, a new property is required:

quarkus.openshift.env.vars.smallrye-config-locations=/deployments/config

Expected behavior configMap is picked up by application deployed to OpenShift.

Actual behavior configMap is not picked up by application deployed to OpenShift.

To Reproduce

  1. Clone https://github.com/quarkus-qe/quarkus-openshift-test-suite
  2. Run configMap tests to reproduce the issue:
    mvn -B -V clean verify -pl app-metadata/deployment,app-metadata/runtime,common,configmap/file-system
    
  3. Add quarkus.openshift.env.vars.smallrye-config-locations=/deployments/config to config-secret/file-system/src/main/resources/application.properties. Rerun test for workaround.

Configuration

quarkus.openshift.expose=true
quarkus.openshift.config-map-volumes.app-config.config-map-name=app-config
quarkus.openshift.mounts.app-config.path=/deployments/config
quarkus.s2i.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-11:latest

Screenshots N/A

Environment (please complete the following information):

  • Output of uname -a or ver: Linux tigris 5.10.8-200.fc33.x86_64 #1 SMP Sun Jan 17 19:53:01 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version:
    openjdk version "11.0.9.1" 2020-11-04
    OpenJDK Runtime Environment 18.9 (build 11.0.9.1+11)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+11, mixed mode, sharing)
    
  • GraalVM version (if different from Java): N/A
  • Quarkus version or git rev: 1.11.0.Final
  • Build tool (ie. output of mvnw --version or gradlew --version): Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T21:00:29+02:00)
  • OpenShift 4.6.9

Additional context (Add any other context about the problem here.)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (14 by maintainers)

Commits related to this issue

Most upvoted comments

@geoand we can’t force working directory to /deployments as there are cases that this might not be true. I’ll look into doing the later.