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

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

Open klopfdreh opened this issue 1 year ago • 2 comments

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:

  • https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination
  • https://kubernetes.io/docs/concepts/workloads/controllers/job/#termination-of-job-pods

this could be configured for SCDF here like described here:

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

klopfdreh avatar Nov 15 '24 09:11 klopfdreh

Are you launching with createJob true or false?

corneil avatar Nov 19 '24 13:11 corneil

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.

klopfdreh avatar Nov 19 '24 15:11 klopfdreh