How do you set global environment variables for child tasks in Spring Cloud Dataflow using Stream - Task-Launcher

Viewed 160

I have a stream with an Http source, custom processor and Task-Launcher Spring Cloud Dataflow Stream

enter image description here

I have a composed task the gets called from the stream - task-launcher

enter image description here

I pass several properties in the stream processor to the task-launcher and to the child tasks for example the kubernetes pull policy which I want set to Always for all the child tasks, example...

"deploymentProps":{"deployer.*.kubernetes.imagePullPolicy","Always"}

Passing properties for pull policy and volumes/volumemounts works as expected

I also want to pass an environment variable to the child tasks for spring to pickup, I have tried the following that does not work...

deploymentProps":{"deployer.*.kubernetes.environment-variables":"SCDF_ACTIVE_PROFILE=prod"}

enter image description here Does not seem to make it to the pod in kubernetes, is there another way to get environment variables to the child tasks or is there something wrong with this approach?

Any help would be appreciated.

1 Answers
Related