Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job's migrate pods aren't cleaned up #19

Open
copelco opened this issue Apr 15, 2020 · 4 comments
Open

Job's migrate pods aren't cleaned up #19

copelco opened this issue Apr 15, 2020 · 4 comments

Comments

@copelco
Copy link
Member

copelco commented Apr 15, 2020

After several deploys, kubectl get pod will start to look like this:

❯ kubectl get pod | grep migrate
migrate-2fq2w               0/1     Completed   0          13h
migrate-6857f               0/1     Completed   0          12h
migrate-7kf5r               0/1     Completed   0          12h
migrate-b2745               0/1     Completed   0          12h
migrate-dt4xj               0/1     Completed   0          13h
migrate-gc6tr               0/1     Completed   0          12h
migrate-gt965               0/1     Completed   0          12h
migrate-hx4nq               0/1     Completed   0          13h
migrate-jbrjs               0/1     Completed   0          13h
migrate-kc4hq               0/1     Completed   0          12h
migrate-l6d7r               0/1     Completed   0          12h
migrate-npjjc               0/1     Completed   0          13h
migrate-v2gml               0/1     Completed   0          12h
migrate-wjqkf               0/1     Completed   0          13h

It can be convenient to see at least a few recent migrate pods to view the logs, but having them build up like this is going to get messy.

@copelco
Copy link
Member Author

copelco commented Apr 15, 2020

CronJob has successfulJobsHistoryLimit, but it's not in the Job spec as far as I can tell.

@JeremyGibson
Copy link
Contributor

The CronJob and TTL Seems intriguing

@JeremyGibson
Copy link
Contributor

Sorry, that was a misclick

@vkurup
Copy link
Contributor

vkurup commented Jun 30, 2020

There is a setting to accomplish this, but it requires enabling a Feature flag, which seems like more customization than I'd prefer: https://kubernetes.io/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants