Skip to content

KEP-5758: Per-container ulimits configuration#5762

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
HirazawaUi:kep-5758
Feb 12, 2026
Merged

KEP-5758: Per-container ulimits configuration#5762
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
HirazawaUi:kep-5758

Conversation

@HirazawaUi
Copy link
Copy Markdown
Contributor

@HirazawaUi HirazawaUi commented Dec 30, 2025

  • One-line PR description: This KEP proposes adding support for per-container ulimit configurations in pod.
  • Other comments:

@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/node Categorizes an issue or PR as relevant to SIG Node. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 30, 2025
@HirazawaUi HirazawaUi changed the title KEP-5758: Per-container ulimits configuration WIP KEP-5758: Per-container ulimits configuration Dec 30, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 30, 2025
@HirazawaUi HirazawaUi force-pushed the kep-5758 branch 4 times, most recently from acb35a6 to e042845 Compare January 3, 2026 06:37
@HirazawaUi HirazawaUi changed the title WIP KEP-5758: Per-container ulimits configuration KEP-5758: Per-container ulimits configuration Jan 3, 2026
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 3, 2026
@HirazawaUi
Copy link
Copy Markdown
Contributor Author

/cc @thockin Though it's been over ten years since this feature was first proposed, you might still be interested in it :)

@zvonkok
Copy link
Copy Markdown

zvonkok commented Jan 4, 2026

/cc @zvonkok holy smokes over ten years... @dims FYI

Copy link
Copy Markdown
Contributor

@kannon92 kannon92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please request a PRR reviewer if you are hoping to get this in for 1.36 cycle.

You can add me as an approver.

@HirazawaUi
Copy link
Copy Markdown
Contributor Author

@kannon92 Thank you so much for being willing to serve as the PRR reviewer for this KEP.

Comment thread keps/sig-node/5785-per-container-ulimits-configuration/README.md Outdated
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md Outdated
@kannon92
Copy link
Copy Markdown
Contributor

Left a few comments from PRR side but I'd like to see a review from container runtime folks (cc @haircommander @saschagrunert @sohankunkerkar @mikebrow).

@HirazawaUi
Copy link
Copy Markdown
Contributor Author

ping @kannon92 @haircommander @samuelkarp

I have responded to all comments. Given that the KEP freeze deadline is very close, we may need to accelerate our efforts.

Also ping @mrunalp @SergeyKanzhelev

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple comments

Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md Outdated
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md Outdated
Comment thread keps/sig-node/5758-per-container-ulimits-configuration/README.md Outdated
@HirazawaUi HirazawaUi force-pushed the kep-5758 branch 2 times, most recently from 6664f34 to b2ea196 Compare February 11, 2026 16:24
@HirazawaUi
Copy link
Copy Markdown
Contributor Author

Let me explain the changes I made:

Only Pods with PSS in Privileged mode can use the ulimit feature

Regardless of whether the pod is in securityContext's privileged mode, it can set ulimit to -1, because even if setting to -1 is not allowed, users could set a sufficiently large value instead, making this restriction meaningless

Changed RuntimeHandlerFeatures to RuntimeFeatures because ulimit is an existing field in the oci spec, and the underlying container runtime (runc/crun) already implements it

@haircommander
Copy link
Copy Markdown
Contributor

Okay given we're restricting to privileged PSA, I think this is safe to try. It's been asked for a number of times over the years, and I think we have space to iterate on how to make it safe for baseline too (maybe baseline can only set soft or something, to be discussed in the future)

/lgtm

@tallclair WDYT about the PSA changes? @mikebrow @samuelkarp any additional thoughts?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 11, 2026
@HirazawaUi
Copy link
Copy Markdown
Contributor Author

ping @kannon92 @samuelkarp @mikebrow @thockin

Apologies for the repeated pings. Since we are just one day away from the KEP freeze, I am very much looking forward to your further suggestions. If possible, I will address or resolve all comments again before the KEP freeze

@HirazawaUi
Copy link
Copy Markdown
Contributor Author

Okay given we're restricting to privileged PSA, I think this is safe to try. It's been asked for a number of times over the years, and I think we have space to iterate on how to make it safe for baseline too (maybe baseline can only set soft or something, to be discussed in the future)

/lgtm

@tallclair WDYT about the PSA changes? @mikebrow @samuelkarp any additional thoughts?

Thank you very much. My github page didn’t refresh this comment in time, so I posted the one above.

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
no additional comments for this stage

"nice",
"rtprio",
"stack",
"nproc",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest dropping support for this in favor of pids cgroup support that we have.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, let's drop nproc for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2026
@HirazawaUi
Copy link
Copy Markdown
Contributor Author

@mrunalp Thank you for your comments. I have addressed all of them. Please take another look.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2026
@HirazawaUi
Copy link
Copy Markdown
Contributor Author

@mrunalp This PR needs another lgtm since it has been updated.

Copy link
Copy Markdown
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HirazawaUi, kannon92, mrunalp, SergeyKanzhelev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 8aee1be into kubernetes:master Feb 12, 2026
4 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.36 milestone Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.