-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batou_ext.oci: Add support for podman
#204
Conversation
db0e430
to
3476623
Compare
Considering how considerable the differences between podman and docker are I'd almost think about splitting it up into two Components 🤔 that might however introduce a bunch of copy-pasted code. This would also eliminate the need to specifiy the backend for every single container. |
Given that
I'd argue that it would be fine to keep it as-is.
Hmm... I'd have to check whether the current approach allows podman & docker in parallel in the first place now that I think of it. You set the backend globally in NixOS. |
Yeah, backend is set globally, so doing it per-container here doesn't make sense. |
@PhilTaken the backend setting is now done via another component. |
I like the podmanruntime component here, that simplifies usage a bunch. I still think theres almost too much complexity in the ocicontainer component here but I cannot think of a good solution. Did you test this with a reasonably complex deployment? |
FC-37959 We mostly want this for healthchecks that must pass before the unit is actually active. This is kept intentionally simple, only healthchecks via sd_notify are supported. Mixing containers in systemd units with `healthy` and `conmon` strategy leads to setups with conflicting requirements (linger vs no linger) and it's far too easy to end up with an unsupported configuration (and containers not behaving properly).
@@ -108,6 +172,12 @@ class Container(Component): | |||
} | |||
|
|||
def configure(self): | |||
self.backend = ( | |||
"podman" | |||
if self.require("oci:podman", strict=False, host=self.host) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering whether we want to make it this implicit.
This might cause a docker assuming container being executed by podman.
Not considering it a blocker though
FC-37959
We mostly want this for healthchecks that must pass before the unit is actually active.