-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add support for podman quadlets #474
Conversation
manifests/quadlet_file.pp
Outdated
String $owner = 'root', | ||
String $group = 'root', |
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.
can you please update those so we don't allow empty string? String[1]
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.
Done.
Note: it was copy-pasted from unit_file.pp
String[1] $owner = 'root', | ||
String[1] $group = 'root', | ||
String[1] $mode = '0444', | ||
Optional[Boolean] $enable = undef, |
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.
do those booleans need to be undef or can we default to true or false?
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.
Not mandatory, it was copy/pasted directly from unit_file.pp
to keep a consistent API in the module.
If you request a change, I can remove the Optional, and set a default value.
I'd been thinking about doing this. If this was going to be done I would at least steal the types I added in southalc/podman#83 so the contents of the quadlet files can be managed. But I question if managing quadlets should be in here at all. These are not unit files processed by systemd. Having said that its easy place to have them and it will not intrude into systemd configuration. I think a seperate quadlet module using as much of this module as possible would make more sense? Which I'm very happy to work on lifting much of what I did above. Result is somewhat we ignoring the existing podman module but that is fine for the sake of actual progress. |
@traylenator at least for unit_files this module does not manage the content of the files. All type definitions and templating were created for the dropins. I copied the behavious of the unit_file.pp for everything which is why I did not add types. I am also unsure if this is the correct spot for this, which is why I did not go all the way, like creating tests and managing the content of the quadlet files. |
Like @traylenator I question it. It's not systemd, but podman. And even with podman you need a new version (4.4+ for basic support, which Debian 12 doesn't even have, newer for the more advanced features). Given the lack of progress on southalc/podman#83 I wouldn't mind taking over that module. Ideally transferring but forking if needed. |
It may actually be easier to start again with a puppet-quadlets module. The southcalc/podman has a load of very necessary at the time hard to do stuff which all becomes unnecessary with simplicity of quadlets. My preference would be new module rather than migration but I would happily work on either. |
I currently don't use the podman module, but I can see how quadlets replace many of the old ways. A puppet-quadlets module sounds like a good plan to me. |
To me it is also not really clear to which domains really belong. Podman? Systemd? I tend more towards podman, thats also where its code is now. |
I agree this is a bit fuzzy in terms of scope, the generator for quadlet is in the podman package. At the same time, there are generators for a bunch of "core" features of podman, like mount points, etc. An additionnal puppet module for quadlets that installs podman, manages the content of quadlet files, might be a good thing. Conceptually the two modues will be pretty similar in features I think. |
If there is going to be a new module, I think it should re-use whatever it can from the systemd module |
Yes of course it would use @dabelenda sounds like we have a plan. Unless more comment in next day or two I'll create repo puppet-quadlets and we can plan it out in an issue. |
Add quadlet support in own module. - voxpupuli/puppet-quadlets#1 |
Closing this PR since we agree that going for another module is the correct path. |
Pull Request (PR) description
This PR adds support for podman Quadlets, a generator for systemd that creates units automatically for files in a specific folder.
Tested with a kube Yaml file and it starts the pod.