containerd / nri

Node Resource Interface
Apache License 2.0
220 stars 58 forks source link

Add support for rlimits #48

Closed samuelkarp closed 9 months ago

samuelkarp commented 10 months ago

This PR adds support for adjusting rlimits and provides a sample plugin. I was able to test this using a patched version of containerd.

codecov-commenter commented 10 months ago

Codecov Report

Patch coverage: 70.58% and project coverage change: +0.05% :tada:

Comparison is base (c83954f) 64.44% compared to head (df234b1) 64.50%.

:exclamation: Current head df234b1 differs from pull request most recent head d2dd708. Consider uploading reports for the commit d2dd708 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #48 +/- ## ========================================== + Coverage 64.44% 64.50% +0.05% ========================================== Files 9 9 Lines 1800 1834 +34 ========================================== + Hits 1160 1183 +23 - Misses 494 500 +6 - Partials 146 151 +5 ``` | [Files Changed](https://app.codecov.io/gh/containerd/nri/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd) | Coverage Δ | | |---|---|---| | [pkg/runtime-tools/generate/generate.go](https://app.codecov.io/gh/containerd/nri/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL3J1bnRpbWUtdG9vbHMvZ2VuZXJhdGUvZ2VuZXJhdGUuZ28=) | `36.00% <66.66%> (+1.54%)` | :arrow_up: | | [pkg/adaptation/result.go](https://app.codecov.io/gh/containerd/nri/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd#diff-cGtnL2FkYXB0YXRpb24vcmVzdWx0Lmdv) | `79.83% <72.72%> (-0.22%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/containerd/nri/pull/48/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=containerd)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SergeyKanzhelev commented 9 months ago

lgtm

bobbypage commented 9 months ago

lgtm

+1 to add support for rlimits in NRI, it will be helpful for folks who need to configure rlimits in k8s environments where rlimits are not natively supported in pod specs.