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
318 stars 10 forks source link

feat: set compatibility with `--podman-version` #46

Closed k9withabone closed 6 months ago

k9withabone commented 6 months ago

Closes #45

Setting a lower podman version will downgrade generated quadlets compatibility. Will return an error if an incompatible quadlet option is used.

Implemented as an in-place, one-way transformation of quadlet::File and its parts. That way, there is less complexity than dealing with multiple versions of each quadlet resource type.

--podman-version has aliases --compatibility and --compat.

k9withabone commented 6 months ago

@cyqsimon, can you test this out and see if it fits with what you wanted?

cyqsimon commented 6 months ago

I tested on a few different compose files and it's looking great. The code looks pretty much like what I imagined too. I have no complaints whatsoever.

Thank you so much for swiftly taking on the feature request!

cyqsimon commented 6 months ago

Oh yes. I noticed that you probably want to update README, in particular the FEATURES and CAUTIONS sections.

k9withabone commented 6 months ago

Will do when I'm getting ready to release the next podlet version.