Job Lease Keeper to cleanup after configurable time
kubectl apply -f https://raw.githubusercontent.com/kube-sailmaker/job-lease-keeper/0.10.0/deploy/job_controller.yaml
kubectl apply -f https://raw.githubusercontent.com/kube-sailmaker/job-lease-keeper/0.10.0/deploy/job_role.yaml
kubectl apply -f https://raw.githubusercontent.com/kube-sailmaker/job-lease-keeper/0.10.0/deploy/job_sa.yaml
kubectl apply -f https://raw.githubusercontent.com/kube-sailmaker/job-lease-keeper/0.10.0/deploy/job_role_binding.yaml
The following environment variables can be configured:
| Environment | Description |
|---|---|
| JOBS_NAMESPACE | namespace to clean jobs from |
| JOB_SUCCESS_THRESHOLD_MINUTES | minimum number of minutes to wait before cleaning a job that finished successfully |
| JOB_FAILURE_THRESHOLD_MINUTES | minimum number of minutes to wait before cleaning a job that failed |
| CHECK_FREQUENCY_MINUTES | frequency at which the check should be performed |
Jobs in multiple namespaces can be cleaned by passing a comma separated list of namespaces. Check Dev Guide for an example.
There are few sample jobs available for testing this
#succeeds
kubectl apply -f sample/job1.yaml -n default
#fails
kubectl apply -f sample/job3.yaml -n default
Content type
Image
Digest
Size
14.9 MB
Last updated
over 6 years ago
docker pull kubesailmaker/job-lease-keeper:0.10.2