Skip to content
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

Support unlimited ulimits #31

Closed
k9withabone opened this issue Oct 4, 2024 · 0 comments · Fixed by #32
Closed

Support unlimited ulimits #31

k9withabone opened this issue Oct 4, 2024 · 0 comments · Fixed by #32
Labels
bug Something isn't working
Milestone

Comments

@k9withabone
Copy link
Owner

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.

@k9withabone k9withabone added the bug Something isn't working label Oct 4, 2024
@k9withabone k9withabone added this to the v0.3.0 milestone Oct 4, 2024
k9withabone added a commit that referenced this issue Oct 4, 2024
Changed `soft` and `hard` fields of `compose_spec::service::Ulimit` to
`compose_spec::service::Limit<u64>`.

Changed `compose_spec::service::Ulimits` type alias (used for `ulimits`
field of `compose_spec::Service` and `compose_spec::service::Build`) to
`IndexMap<Resource, ShortOrLong<Limit<u64>, Ulimit>>`.

Changed `<Ulimit as AsShort>::Short` to `Limit<u64>`.

Added `impl From<Limit<u64>> for Ulimit`.

Added `impl From<u64> for Limit<u64>`.

Added `impl<T, L> From<Limit<T>> for ShortOrLong<Limit<T>, L>` and
`impl<L> From<u64> for ShortOrLong<Limit<u64>, L>`.

Fixes: #31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant