Closed cyqsimon closed 6 months ago
I'm not sure maintaining multiple versioned structs is the way to go here. It would add too much complexity and cognitive overhead.
I'll add this as a "best effort" feature. The struct representing the quadlet (at the moment quadlet::File
and quadlet::Resource
) will be changed in place, moving new options to PodmanArgs=
. The generated quadlet may not be optimal. Additionally, an error may be returned when downgrading.
I can perhaps send a PR for this. Will look into this over the weekend.
I actually mostly finished it already. Wasn't as hard as I thought it would be. I'll post a PR later today or tomorrow. Once I post it, when you get the chance, could you take a look at it to see if it fits your expectations?
That's awesome. Thanks for the great work. I'm happy to help with the review.
Many point-release distros may ship older versions of podman. It would be nice if the newest version of podlet can generate a quadlet file that's compatible with an older version of podman on demand with an option. Something like this:
On the technical side, I know of the obake crate that allows versioned structs. Perhaps this is something worth looking into, although I cannot say for sure how applicable it will be to this specific situation.