1

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
  • 11
  • 1

1 Answers1

0

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
  • 1,723
  • 1
  • 13
  • 8
  • I use SCDF kubernetes Server to deploy the task app,environment variables can be shown in the task app,but arguments can not be shown,then, i print the content of ApplicationArguments in the task app,i find it is empty – kyo Oct 15 '17 at 00:16
  • if i change spring.cloud.deployer.kubernetes.entryPointStyle=shell,the properties will be passed in through Environment Variables,and shown in the task app. – kyo Oct 15 '17 at 00:30
  • if i use SCDF Local Server, it is no problem for this. – kyo Oct 15 '17 at 00:32