[release-1.35] Add min_injected_gomaxprocs via runtime handler precreate hook#9876
Conversation
Implement GOMAXPROCS injection as a composable PreCreate runtime handler hook instead of inline logic in container_create.go. This follows the existing CRI-O hook architecture (like HighPerformanceHooks) and allows the GOMAXPROCS hook to compose with other hooks via CompositeHooks. Key changes: - GomaxprocsHooks: PreCreate hook that reads CPU shares from the OCI spec, calculates GOMAXPROCS with a configurable floor, and injects the env var for burstable/best-effort pods - CompositeHooks: chains multiple RuntimeHandlerHooks implementations, enabling GOMAXPROCS to work alongside high-performance hooks - HooksRetriever.Get(): builds a hook chain when inject_gomaxprocs > 0 - Config field, CLI flag, annotation, docs, completions, and tests The hook fires for all OCI runtimes and skips guaranteed pods, workload-partitioned pods, pods with CPU limits (Go 1.25+ auto-detects), and pods that already have GOMAXPROCS set. Signed-off-by: Peter Hunt <pehunt@redhat.com> Co-authored-by: Harshal Patil <12152047+harche@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-1.34 |
|
@haircommander: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-1.35 #9876 +/- ##
================================================
- Coverage 67.74% 67.74% -0.01%
================================================
Files 211 213 +2
Lines 29294 29412 +118
================================================
+ Hits 19845 19924 +79
- Misses 7766 7799 +33
- Partials 1683 1689 +6 🚀 New features to boost your workflow:
|
|
/retest |
|
/retest |
|
@haircommander: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/override ci/prow/e2e-gcp-ovn |
|
@haircommander: Overrode contexts on behalf of haircommander: ci/prow/e2e-gcp-ovn DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@haircommander: #9876 failed to apply on top of branch "release-1.34": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This is an automated cherry-pick of #9860
/assign haircommander