Skip to content

Add crictl update --oom-score-adj flag#1781

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
saschagrunert:oom-kill-update
Mar 5, 2025
Merged

Add crictl update --oom-score-adj flag#1781
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
saschagrunert:oom-kill-update

Conversation

@saschagrunert

Copy link
Copy Markdown
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

We have not used the value for the container update since now, which is now being added for feature completeness.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

@kubernetes-sigs/cri-tools-maintainers

Does this PR introduce a user-facing change?

Added `crictl update --oom-score-adj` flag.

We have not used the value for the container update since now, which is
now being added for feature completeness.

Signed-off-by: Sascha Grunert <[email protected]>
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 25, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saschagrunert

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 added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 25, 2025
@SergeyKanzhelev

Copy link
Copy Markdown
Member

Is it a revert of of #279?

@saschagrunert

saschagrunert commented Feb 27, 2025

Copy link
Copy Markdown
Member Author

Is it a revert of of #279?

Oh, yes. I'm wondering why we should not have flags for mainly all available runtime update fields. There are also others missing:

https://github.com/kubernetes/cri-api/blob/3dd84b8b2b65ecdf2087863f2e028266cfa46dcb/pkg/apis/runtime/v1/api.proto#L849-L855

There are also other runtimes like crun and youki. 🤔

@SergeyKanzhelev

Copy link
Copy Markdown
Member

There are also other runtimes like crun and youki. 🤔

I am not sure what is the right way to do here. Did you want it for completeness? Or some scenario is missing?

@Karthik-K-N

Copy link
Copy Markdown

From perspective of Node Resource Hot Plug KEP, where we are planning to utilize UpdateContainerResources CRI API to update the running container with updated oom_score_adj and swap limit (already supported), We would like to have this feature added and later integrate it with UpdateContainerResources CRI API so we will be able to update the oom_score_adj for container. Thanks.

@SergeyKanzhelev

Copy link
Copy Markdown
Member

From perspective of Node Resource Hot Plug KEP, where we are planning to utilize UpdateContainerResources CRI API to update the running container with updated oom_score_adj and swap limit (already supported), We would like to have this feature added and later integrate it with UpdateContainerResources CRI API so we will be able to update the oom_score_adj for container. Thanks.

/lgtm

I guess we will be ok to return error if not supported on some runtimes

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2025
@k8s-ci-robot
k8s-ci-robot merged commit 281549d into kubernetes-sigs:master Mar 5, 2025
@Karthik-K-N

Copy link
Copy Markdown

From perspective of Node Resource Hot Plug KEP, where we are planning to utilize UpdateContainerResources CRI API to update the running container with updated oom_score_adj and swap limit (already supported), We would like to have this feature added and later integrate it with UpdateContainerResources CRI API so we will be able to update the oom_score_adj for container. Thanks.

/lgtm

I guess we will be ok to return error if not supported on some runtimes

Yeah, Thank you.

@saschagrunert
saschagrunert deleted the oom-kill-update branch March 6, 2025 07:35
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants