Closed void-spark closed 1 year ago
I don't think it is easy to support init cotnianers in systemd, for podman run --init-ctr makes no sense as you noted the order is important.
One thing that could work is to make the init-ctr.service Type=oneshot and the other container units use an After=init-ctr.service. However such a way would only work for init-ctr always
not once
.
It is properly just easier to not support it and error out for podman generate systemd.
cc @vrothberg
Thanks for reaching out and the ping!
It is properly just easier to not support it and error out for podman generate systemd.
I agree. podman generate systemd
shouldn't receive new features as our focus lies on Quadlet which supports running Pods by means of Kubernetes YAML.
Extending generate systemd
to error out on a pod with init containers seems like a good way forward to me.
which supports running Pods by means of Kubernetes YAML.
Don't tease me, we'd be looking into using that if we weren't stuck with podman 4.2.0 on Redhat :)
Thanks for sharing, @void-spark! That is really cool to know. Feel free to try Quadlet out on Fedora or CentOS Stream.
If you have some feature requests or find bugs, feel free to share them early on. This way, it'll be ready when you upgrade your RHEL machines :)
I have one idea without even testing, from looking into it before and this issue. It ofcourse won't be feature complete for every possible kubernetes yaml/artifact, having any kind of feedback (warnings, run with a extra -v, dedicated scan_for_issues command?). when it encounters parts it doesn't support in the yaml, instead of just silently ignoring it, would be most useful :) Unless it does that already of course :)
Thanks for sharing, @void-spark! Would you mind opening a dedicated issue for the -v
idea? Cc: @umohnani8
Thanks for sharing, @void-spark! Would you mind opening a dedicated issue for the
-v
idea? Cc: @umohnani8
There is already https://github.com/containers/podman/issues/18332
Issue Description
Using something like:
On podman 4.5.0 generates systemd files which won't work.
This is mainly an issue for me since now I don't have a nice example of how to set up systemd with a init container :)
Steps to reproduce the issue
Check output for the init container systemd file.
Describe the results you received
Describe the results you expected
Systemd files which would work correctly with a init container.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
-
Additional information
-