0
votes

I'm deploying a Spring Cloud Dataflow stream onto Cloud Foundry. I need to set an environment variable for the underlying stream applications. I know that putting in configuration into the stream definition will update the SPRING_APPLICATION_JSON env variable, but I want to create a new env variable.

There is a reference I see to use the following configuration:

spring.cloud.deployer.local.envVarsToInherit

To get this to work, I've tried putting the following environment variables in my Spring Cloud Dataflow Server:

ABCD = VALUE
spring.cloud.deployer.local.envVarsToInherit = ABCD

However, when I deploy the stream, the underlying stream applications don't appear to be inheriting ABCD. Is there something I am missing to get an environment variable set on an underlying application?

Thanks.

1

1 Answers

0
votes

The property spring.cloud.deployer.local.envVarsToInherit is applicable only to local deployer and not for CF deployer. To set any environment variables for the stream application running inside the data flow server, it is recommended you provide the app/deployer properties via Stream DSL as documented here