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

Task Launcher doesn't create Job as expected.

Open corneil opened this issue 1 year ago • 2 comments

Description: Deploying a Task with CTR definition and launching as a job with ttl-seconds-after-finished doesn't apply the properties as expected. No Kubernetes Job is created. When the task is Scheduled then we do find that Jobs are created according to the schedule. However the ttlSecondsAfterFinished does not appear in the description of the Job.

Steps to reproduce Create a task with dsl timestamp && timestamp-batch Launch with the properties:

deployer.*.kubernetes.create-job=true
deployer.*.kubernetes.ttl-seconds-after-finished=120

Release versions: 2.11.2

corneil avatar Apr 12 '24 11:04 corneil

SCDF currently sets this property globally for all apps spring.cloud.deployer.kubernetes.createJob. However, the deployer can be updated so that it can check for the deployer.kubernetes.create-job property and if present it will create the job (or not) based on the boolean value.

cppwfs avatar Apr 17 '24 16:04 cppwfs

After further investigation, in order for SCDF to support the ability for a user to specify spring.cloud.deployer.kubernetes.create-job true or false for each task launch, we'd have to update SCDF to check both jobs and pods for deletions, log acquisition, creation(launching), retrieving task resources etc. You can view some of the changes required here: https://github.com/cppwfs/spring-cloud-deployer/tree/DEP-JOB-TASK

cppwfs avatar Apr 22 '24 17:04 cppwfs