https://prefect.io logo
#prefect-community
Title
# prefect-community
s

Sam Garvis

09/19/2022, 5:20 PM
I was just curious why all these jobs stay around with the helm prefect-agent. I am using the most recent version of prefect-agentalso. Cuz I can't view the logs for previous jobs, it says
Stream closed EOF for prod-prefect/analytic-shrimp5rkr9-j82lj (prefect-job)
for all of them. Are they supposed to auto delete?
1
k

Kevin Grismore

09/19/2022, 5:45 PM
you can customize the kubernetes job with
Copy code
"spec": {
    "ttlSecondsAfterFinished": 100,
to specify the number of seconds after a job is finished until the pod is deleted
1
gratitude thank you 2
s

Sam Garvis

09/19/2022, 5:48 PM
Thank you
k

Kevin Grismore

09/19/2022, 5:51 PM
to be clear, I'm referring to the job that your flow will run in, not the agent manifest
s

Sam Garvis

09/19/2022, 5:52 PM
Yes, I understood. I'm going to change the k8s-job-block in the UI that my flows run in
🙌 1
I changed the job and it's still not deleting. I tested two flows, and they're still here after 20 minutes
k

Kevin Grismore

09/19/2022, 6:33 PM
put the setting inside the outer spec
🙌 1
👍 1
Copy code
"spec": {
    "ttlSecondsAfterFinished": 100,
    "template": {
      "spec": {
        "parallelism": 1,
        "completions": 1,
🙏 1
s

Sam Garvis

09/19/2022, 6:37 PM
Perfect, it just deleted
❤️ 1