intellij-kubernetes icon indicating copy to clipboard operation
intellij-kubernetes copied to clipboard

Display pods that belong to a job

Open adietish opened this issue 5 years ago • 4 comments

Currently jobs are listed as is, without displaying pods that belong to them as children. That's how vscode is impl'd currently:

image

We agreed when discussing #70 that it would be a nice enhancement to display these pods as it is currently done for services etc.

adietish avatar Jun 30 '20 14:06 adietish

And you have the same issue with CronJobs: seems a CronJob generates a new Job each time a schedule is created

jeffmaury avatar Jun 30 '20 14:06 jeffmaury

Not sure if it's possible to find the jobs created by a cronjob. I found this https://github.com/Azure/vscode-kubernetes-tools/issues/343 before when looking for why they didn't list pods for a job. Maybe it can be helpful.

lstocchi avatar Jun 30 '20 14:06 lstocchi

I don't buy this. See this from the k8s documentation:

A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created.

So the Job controller needs a way to find the pods from the Job

jeffmaury avatar Jun 30 '20 15:06 jeffmaury

They talk about jobs created by a cronjob, not pods created by a job. I thought you were referring about showing jobs (as children of the cronjob node) created by a cronjob in the tree. And in that link they said there is no way apparently to retrieve a job by the cronjob name. Now i don't know if it's true, maybe it changed. I shared it as a reference

lstocchi avatar Jun 30 '20 15:06 lstocchi