podman icon indicating copy to clipboard operation
podman copied to clipboard

[Feature]: Kube Play: add support for Job

Open ygalblum opened this issue 2 years ago • 13 comments

Feature request description

Currently, podman supports pods and deployments. While pod is the base element, K8S users will usually not deploy pods. Instead, they will deploy deployments for long lasting workloads and jobs for single shot operations. When using systemd, the behavior of jobs seems to be a better fit as it will not have Podman monitor the pods but instead pass the monitoring and hence the handling of the restart policy to systemd. For example, the supported valued for restartPolicy for containers in a Job are only Never or OnFailure. So, a default restartPolicy of Never, with parallelism and completions set to 1 will result in propagating the exit status of the pod to systemd, letting it decide whether or not the service should be restarted (depending on the restart policy of the systemd unit)

Suggest potential solution

Passing a job to podman kube play will result in running the containers listed in the Pod specification

Have you considered any alternatives?

As explained, the user may use deployments or pods directly. But, it will not provide the same experience

Additional context

While the trigger for this feature request is Quadlet and systemd, podman will directly benefit from this added support as well

ygalblum avatar Jan 05 '23 15:01 ygalblum

Makes sense to me.

rhatdan avatar Jan 05 '23 18:01 rhatdan

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Feb 05 '23 00:02 github-actions[bot]

/stale remove

ygalblum avatar Feb 07 '23 15:02 ygalblum

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Mar 14 '23 00:03 github-actions[bot]

@umohnani8 PTAL

rhatdan avatar Mar 15 '23 15:03 rhatdan

any updates?

fsdrw08 avatar Jul 01 '23 00:07 fsdrw08

A design doc has been created for this and it is on the to do list, targeting this for 4.7.

umohnani8 avatar Jul 03 '23 15:07 umohnani8

link to design doc / discussions?

mrgleeco avatar Aug 03 '23 08:08 mrgleeco

@umohnani8 Could you please show the link to the design doc?

adelton avatar Apr 18 '24 07:04 adelton

any updates?

fsdrw08 avatar May 30 '24 11:05 fsdrw08

Yup, I have a WIP in PR - will clean it up and open a PR by next week.

umohnani8 avatar May 30 '24 14:05 umohnani8

This makes a lot of sense. I believe podman is getting a lot of attention in HPC, I myself find it very flexible and simple for rootless use cases, where developers test their own containers, and in many cases they then send them to kubernetes. For HPC, jobs are the most common kubernetes yaml.

jjhidalgar avatar Jul 24 '24 17:07 jjhidalgar

@umohnani8 Still have the PR? Maybe someone else can take it over?

rhatdan avatar Jul 24 '24 19:07 rhatdan