OCPNODE-4602: implement {system,container}GomaxprocsBehavior field - #6332
OCPNODE-4602: implement {system,container}GomaxprocsBehavior field#6332haircommander wants to merge 3 commits into
Conversation
Add GomaxprocsBehaviorType, ContainerGomaxprocsBehavior, and SystemGomaxprocsBehavior fields to the vendored API types, along with the FeatureGateGomaxprocsInjection feature gate definition. These changes mirror openshift/api PR openshift#2934 and will be replaced by a proper vendor bump once that PR merges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peter Hunt <pehunt@redhat.com>
…ed_gomaxprocs Implement the container-level half of the GOMAXPROCS injection feature. When the GomaxprocsInjection feature gate is enabled, the ContainerGomaxprocsBehavior field on ContainerRuntimeConfig translates to CRI-O's min_injected_gomaxprocs setting via a crio.conf.d drop-in: Autosize sets it to 1 (enabling CRI-O's per-container GOMAXPROCS injection) and Disabled sets it to 0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peter Hunt <pehunt@redhat.com>
Implement the system-service half of the GOMAXPROCS injection feature. When the GomaxprocsInjection feature gate is enabled and SystemGomaxprocsBehavior is set to Autosize on KubeletConfig, the node-sizing script calculates GOMAXPROCS as max(ceil(system_reserved_cpu), 1) and writes systemd drop-in files (30-gomaxprocs.conf) for both kubelet.service and crio.service. Switching away from Autosize cleans up the drop-ins. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Peter Hunt <pehunt@redhat.com>
|
@haircommander: This pull request references OCPNODE-4602 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (13)
WalkthroughThe change adds feature-gated gomaxprocs configuration across CRI-O drop-ins, kubelet Ignition generation, and node-sizing systemd templates, with tests covering enabled, disabled, autosize, and empty behavior cases. ChangesGomaxprocs injection
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant FeatureGateHandler
participant KubeletController
participant ContainerRuntimeController
participant KubeletIgnition
participant CRIODropins
participant NodeSizing
FeatureGateHandler->>KubeletController: enable or disable gomaxprocs injection
KubeletController->>KubeletIgnition: pass systemGomaxprocsBehavior
KubeletIgnition->>NodeSizing: emit SYSTEM_GOMAXPROCS_BEHAVIOR
FeatureGateHandler->>ContainerRuntimeController: enable or disable gomaxprocs injection
ContainerRuntimeController->>CRIODropins: render min_injected_gomaxprocs
NodeSizing->>CRIODropins: create or remove systemd gomaxprocs drop-in
Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: haircommander The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test unit |
1 similar comment
|
/test unit |
|
@haircommander: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/hold Holding to allow the Kube rebase to land in #6321. Please ensure this will not cause merge conflicts for the Kube rebase before unholding this PR. |
- What I did
implement openshift/enhancements#2047
- How to verify it
- Description for the changelog
Summary by CodeRabbit
New Features
Bug Fixes