snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Environment variables from secrets are not exported on OCP 3.11 #98

Closed snowdrop-bot closed 4 years ago

snowdrop-bot commented 4 years ago

Describe the bug Exporting secrets as environment variables as described by Deploying to OpenShift guide does not work on OCP 3.11.

The same feature works correctly on OCP 4.x.

Expected behavior Secrets should be present in environment variables specified by the property name.

Actual behavior Environment variables are not available in deployment pods on OCP 3.11.

To Reproduce Steps to reproduce the behavior:

  1. Checkout https://github.com/mjurc/mock-artifacts
  2. oc login to OCP 3.11
  3. cd quarkus/getting-started/
  4. oc apply -f src/main/resources/secret.yaml
  5. mvn clean package
  6. check the deployment pod's env vars - the environment variables are not exported in environment variables as defined by the application's application.properties file, e. g. DB_DATABASE=postgresql

Configuration

quarkus.openshift.expose=true
quarkus.kubernetes-client.trust-certs=true
quarkus.s2i.base-jvm-image=registry.access.redhat.com/openjdk/openjdk-11-rhel7

quarkus.openshift.env-vars.DB_DATABASE.secret=postgresql
quarkus.openshift.env-vars.DB_DATABASE.value=database
quarkus.openshift.env-vars.DB_USERNAME.secret=postgresql
quarkus.openshift.env-vars.DB_USERNAME.value=username
quarkus.openshift.env-vars.DB_PASSWORD.secret=postgresql
quarkus.openshift.env-vars.DB_PASSWORD.value=password

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

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


https://github.com/quarkusio/quarkus/issues/9561


$upstream:9561$

iocanel commented 4 years ago

Status update: Fix has been merged on 1.3. We also need to check and apply on master if that makes sense.