Spring Cloud Task can not wok on SCDF Kubernetes

10/14/2017

i use SCDF Kubernetes Server to deploy the Spring Cloud Task. When i launch the Spring Cloud Task on SCDF Kubernetes Server,i find two strange problems, see below detail:

  1. when deploying the Spring Cloud Task,the Pod with arguments will be produced on Kubernetes,see Pod picture. the problem is that arguments of the Pod can not pass to the Spring Cloud Task.
  2. when i launch the Spring Cloud Task,if i want to add some properties that the format is app.mytask.test=aaa,i find the property can not pass to Spring Cloud Task, and even override all arguments.

am i missing something?,or bugs? please give me some advises, thanks

-- kyo
kubernetes
spring-cloud-dataflow
spring-cloud-task

1 Answer

10/14/2017

Why do you think the arguments are not passed to the task app? It works fine for me. I created a simple task that just prints the args:

dataflow:>app register --type task --name hello --uri docker://dturanski/hello-world-task:v2
dataflow:>task create --name hello --definition "hello"
dataflow:>task launch hello --arguments "app.mytesk.test=aaa"

The log file:

Starting: TaskExecution{executionId=5, parentExecutionId=null, exitCode=null, taskName='hello', startTime=Sat Oct 14 21:21:42 GMT 2017, endTime=null, exitMessage='null', externalExecutionId='null', errorMessage='null', arguments=[--spring.datasource.username=root,spring.cloud.task.name=hello, spring.datasource.url=jdbc:mysql://10.59.251.149:3306/dataflow, -spring.datasource.driverClassName=org.mariadb.jdbc.Driver, --spring.datasource.password=srz427UgQ0, app.mytesk.test=aaa, -spring.cloud.task.executionid=5]}
arg: --spring.datasource.username=root
arg: --spring.cloud.task.name=hello
arg: --spring.datasource.url=jdbc:mysql://10.59.251.149:3306/dataflow
arg: --spring.datasource.driverClassName=org.mariadb.jdbc.Driver
arg: --spring.datasource.password=srz427UgQ0
arg: app.mytesk.test=aaa
arg: --spring.cloud.task.executionid=5

Actually, the args are already shown in the standard Starting: TaskExecution message.

-- dturanski
Source: StackOverflow