Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Propose not to delete all pods after the job finished #797

Closed
hzxuzhonghu opened this issue Apr 17, 2019 · 3 comments
Closed

Propose not to delete all pods after the job finished #797

hzxuzhonghu opened this issue Apr 17, 2019 · 3 comments
Labels
sig/apps Categorizes an issue or PR as relevant to SIG Apps.

Comments

@hzxuzhonghu
Copy link
Contributor

After I run a batch.volcano.sh/Job, i want to look at the logs of the task. But i find the pods are all deleted.
I think it is common use case to check the logs., so i would keep all the job related resources. until user explicitly want to delete.

@k82cn
Copy link
Contributor

k82cn commented Apr 17, 2019

/cc @TommyLike

@SrinivasChilveri
Copy link

I think any how user need not required to delete each pod explicitly ,as he deletes volcano job automatically the pods will be deleted ,so I think its always better to give more flexibility to user, to delete his own created jobs & related resources like pods,pvcs,services etc. even if we see currently we are delete-ting the service, pvc etc during the batch.volcano.sh/Job deletion by using the OwnerReferences as shown below.

Its better to follow the same for pods instead of explicit deleting on completed

In createJobIOIfNotExist func
pvc := &v1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Namespace: job.Namespace,
Name: outputPVC,
OwnerReferences: []metav1.OwnerReference{
*metav1.NewControllerRef(job, helpers.JobKind),
},
},
Spec: *job.Spec.Output.VolumeClaim,
}

@k82cn
Copy link
Contributor

k82cn commented Apr 19, 2019

/sig apps

@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Apr 19, 2019
@k82cn k82cn closed this as completed Apr 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
None yet
Development

No branches or pull requests

4 participants