Skip to content

Allow finer-grained control over pod grace periods.

What does this MR do?

Replaces terminationGracePeriodSeconds with more specific settings:

  • podTerminationGracePeriodSeconds - applied as a property of the job pod
  • cleanupGracePeriodSeconds - used when cleaning up the pod

For backwards compatibility, if terminationGracePeriodSeconds is specified, it will override any of the more specific settings.

Fixes #25668 (closed)

Why was this MR needed?

It is not currently possible to control separately the grace period applied to the pod at creation time (which is used e.g. when cluster autoscaler scales down, where we want the grace period to be long enough to give a job a good chance of finishing) and the grace period used when sending a request to delete a pod (e.g. when cleaning up after job completion, where we want the grace period to be 0 so that pods are cleaned up instantly)

See #25668 (closed) for full details

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Closes #25668 (closed)

Edited by Georgi N. Georgiev

Merge request reports