Closed 1player closed 1 year ago
Makes sense to me. but we may need to default to --detach=true, since we would not wan to break existing scripts.
Starting with Podman v4.2, the pods terminate on their own. They won't be removed but they terminate. Would that address your issue?
Starting with Podman v4.2, the pods terminate on their own. They won't be removed but they terminate. Would that address your issue?
Does this mean that on Podman 4.2 play kube
stays in the foreground until stopped with Ctrl-C, and at that point pods are terminated? That would indeed address this issue.
Does this mean that on Podman 4.2 play kube stays in the foreground until stopped with Ctrl-C, and at that point pods are terminated? That would indeed address this issue.
No, nothing runs in the foreground. But if all containers in a pod exited, then the pod gets stopped automatically.
Ah, then what I'm requesting is different. This issue is to have a mode that all pods are started with play kube
, and they stay running until the play kube
process is stopped. At that point the pod is terminated. In other words:
Currently play kube
only provides a "detach" mode, and users need to remember to do a play kube --down
manually or everything keeps running indefinitely.
Thanks for elaborating. That sounds doable: play kube
waits for a sigstop and runs play kube --down
when receiving the signal.
A friendly reminder that this issue had no activity for 30 days.
Ugh. Not stale.
@umohnani8 Could you take a look at this or assign an intern? @ashley-cui @vrothberg ^^
I can look at this one
You can assign this to me, I have a PR ready to go but I can't test properly until #15071 is fixed.
@1player for testing, you could ./bin/podman system service -t0
. That will work around the issue in #15071.
A friendly reminder that this issue had no activity for 30 days.
@1player What is the status of this?
The PR is still open, I've answered there, but I don't see why this issue needs to be closed. It's still a valid request with related PR.
It does not need to be closed. I like the proposed fix, just want to get it's status.
A friendly reminder that this issue had no activity for 30 days.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Requesting a command line option to run
podman play kube
in the foreground. All containers are started normally, and when the podman process is terminated, all pods are stopped. This is so I don't have to remember to runpodman play kube --down
every time.The goal is to have a similar behaviour as
docker-compose up
, which runs all services and stops them when the process is stopped, unless--detach
is passed.The use case is for local development. I would like to start my dev pods, and for them to be stopped automatically if I close the terminal. With the current behaviour, more than one time I've forgot to call
podman play kube --down
and I had my dev containers consuming resources in the background.