spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

Scheduler creation via API breaks / Creation via UI works

Open juergenhuber opened this issue 6 years ago • 1 comments

We are shipping task scheduler via pipeline delivery. Therefore we are going with the REST API to automatically create the tasks and their schedules. Our setup bases on an underlying K8S cluster. If the schedules are created manually via SCDF UI, everything works fine. Other than that, by creation via the API a cmdarg. prefix seems to break the command line syntax in the K8S cron resource. I attached two yaml files of the K8S cron resource, that's getting created from SCDF:

  1. Manual creation via UI
  2. Automated creation via API

The automated creation is carried out via a curl call. I attached this as well in a separate file.

curl_command_to_call_api.txt manual_created_cron_via_scdf_ui_yaml.txt automatically_created_cron_via_scdf_api_yaml.txt

juergenhuber avatar Jan 10 '20 16:01 juergenhuber

I completed the examination meanwhile and the strange behavior was caused by my misunderstanding of the API docs. The "arguments" field is not used to ship the K8S deployer properties, rather those are going to the properties field.

Here is a working sample of a CURL call, that creates the task scheduler as expected: curl_command_to_call_api_works.txt

juergenhuber avatar Jan 14 '20 08:01 juergenhuber