k9withabone / compose_spec_rs

Rust library for (de)serializing from/to the compose-spec
https://crates.io/crates/compose_spec
Mozilla Public License 2.0
3 stars 0 forks source link

Support unlimited ulimits #31

Closed k9withabone closed 1 month ago

k9withabone commented 1 month ago

From containers/podlet#117.

Support setting services[].ulimits[] to -1, i.e., unlimited. While neither the Compose Specification nor the docker run docs allow this possibility explicitly, the podman run --ulimit docs do.

The ulimit types in compose_spec::Service should be changed to make use of compose_spec::service::Limit<T>. The compose_spec::service::Ulimits type alias should be changed to IndexMap<Resource, ShortOrLong<Limit<u64>, Ulimit>>. The soft and hard fields of compose_spec::service::Ulimit should be changed to Limit<u64>.

This is a breaking change.