containers / podlet

Generate Podman Quadlet files from a Podman command, compose file, or existing object
https://crates.io/crates/podlet
Mozilla Public License 2.0
322 stars 10 forks source link

Add support for --sysctl #22

Closed b-rad15 closed 7 months ago

b-rad15 commented 8 months ago

Gonna be honest, don't entirely understand the codebase (or rust for that matter) but I tried to match this up with the existing params best I could (cap_add seemed to be the most similar so I based on that mostly) and it appears to work fine in accordance with the quadlet man page

k9withabone commented 8 months ago

Thanks for your contribution! The Sysctl= quadlet option was added in podman 4.6.0 and the current minimum version for podlet is 4.5.0, so I won't merge this just yet. Support for podman 4.6.0 is next on my list though after the next patch release. I'm currently working on cleaning up the code a bit, please let me know what I can do to make it easier to understand!

b-rad15 commented 8 months ago

The biggest confusing things were just the lack of comments making it confusing which parts of the code did what, or what files corresponded to which subcommands. Also this might be my lack of Rust knowledge but understanding why some arguments had custom datatypes (iirc sysctl had one) where others did not and were just parsed directly to a vector of strings.