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

pods from jobs created by kustomization become orphan after kustomization gets deleted #440

Closed
miadabrin opened this issue Oct 7, 2021 · 0 comments · Fixed by #482
Closed

Comments

@miadabrin
Copy link

miadabrin commented Oct 7, 2021

When a kustomization object is deleted (with prune: true) the jobs underneath it will be deleted as well but Completed pods belonging to those jobs do not get deleted.

This should have something to do with PropagationPolicy when issuing the delete command from kubeclient as I read through the code ( it should be set to foreground or background ).

reproducing
create a simple kustomization with a job in it, delete the kustomization, you will see the job is deleted but the pod belonging to the job is still there

observations
OwnerReferences are wiped out from the pods when the job is deleted.

Expected behaviour
Pods should be deleted along with jobs when kustomization is deleted.

References

Sidenote
I can probably create a PR for this

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

Successfully merging a pull request may close this issue.

1 participant