EDITD / kubetools

:nut_and_bolt: Kubetools is a tool and processes for developing and deploying microservices to Kubernetes.
MIT License
13 stars 2 forks source link

Add support for job time to live #135

Closed balbirthomas closed 1 year ago

balbirthomas commented 1 year ago

Failure to remove resources used by completed jobs/pods can lead to resource exhaustion in the Kubernetes cluster. This commit adds support for setting a ttlSecondsAfterFinished parameter in the Kubernetes Job sepc. This parameter specifies the amount of time (in seconds) for which the resources used by completed job/pod will persist after it which it will be garbage collected by the Kube control manager.

The newly added parameter is optional and only set if it passed in through the config argument to the make_job_spec method.

Purpose of PR

Parts of the app this will impact

Todos

Additional information

Related links

balbirthomas commented 1 year ago

Please check if tests can be added for this new flag, and if any documentation/samples needs updated

Ack. Will do and ping you for review.