spring-cloud / spring-cloud-deployer

The Spring Cloud Deployer project defines an SPI for deploying long lived applications and short lived tasks
162 stars 87 forks source link

Feature: Possibility to use terminationGracePeriodSeconds for Pods / Jobs for kubernetes #495

Open klopfdreh opened 4 days ago

klopfdreh commented 4 days ago

We faced some issues that the Composed Task Runner of Spring Cloud Data Flow Server received a SIGTERM and was shutdown gracefully inbetween DSL operations. The CTR then returned a non-error return code (0).

It would be great to set the terminationGracePeriodSeconds to a very low value (e.g. 1. - default is 30) so that the container is killed directly. In those cases we can detect the crash and use our restart mechanism.

See:

this could be configured for SCDF here like described here:

https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/#configuration-kubernetes-deployer

corneil commented 11 hours ago

Are you launching with createJob true or false?

klopfdreh commented 9 hours ago

Yes we are using createJob true - but from what I saw in the docs of Kubernetes it applies to Pods and Pods created by Jobs.