Unable to pass environment variables within hotrod-client.properties in OpenShift

42 Views Asked by At

I have an application that is deployed in Redhat Openshift. The application also uses hotrod client to connect to RedHata Data Grid in Openshift. I have hotrod-client.properties in my application classpath to connect to RDG by specifying the properties required for hotrod.

It looks as follows:

infinispan.client.hotrod.server_list=test:443
infinispan.client.hotrod.client_intelligence=BASIC
infinispan.client.hotrod.auth_username=user
infinispan.client.hotrod.auth_password=pass

When I give the properties as above everything seems to be working fine.

However when I give them as environment-variables/configmap within openshift environment it is unable to read the values

infinispan.client.hotrod.server_list=${URL}
infinispan.client.hotrod.client_intelligence=${AUTH}
infinispan.client.hotrod.auth_username=${USER}
infinispan.client.hotrod.auth_password=${PASS}

When I give as below it is unable to fetch the values. ** P.S** : I have other properties files within my application and environment variables seems to work fine there. The issue is only with hotrod-client.properties file.

Attaching links for reference: Running data grid on openshift

0

There are 0 best solutions below