Skip to content

OCPBUGS-78355: add cpu limits to catalogsource pods - #3915

Open
ankitathomas wants to merge 1 commit into
operator-framework:masterfrom
ankitathomas:cpu-limits
Open

ankitathomas wants to merge 1 commit into
operator-framework:masterfrom
ankitathomas:cpu-limits

Conversation

@ankitathomas

@ankitathomas ankitathomas commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Description of the change:
On startup, catalogsource pods cause CPU spikes which can degrade node health on clusters. This PR adds resource limits to CPU cores for catalogsource pods to avoid performance degradation. CPU limit set to 2 cores since openshift nodes typically need 4 cores for multi node clusters and 8 cores for single node openshift.

Summary by CodeRabbit

  • Bug Fixes
    • Catalog-building pods now have a CPU limit of 2 cores.
    • This helps prevent CPU spikes during startup and reduces the risk of impacting other workloads on the same node.
    • Standard and extracted catalog pod configurations now consistently apply the same resource limit across supported security-context scenarios.

Signed-off-by: Ankita Thomas <ankithom@redhat.com>
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a9307c1c-5623-4fe1-a4b1-a3e17cd00489

📥 Commits

Reviewing files that changed from the base of the PR and between aa57204 and 691a1f8.

📒 Files selected for processing (2)
  • pkg/controller/registry/reconciler/reconciler.go
  • pkg/controller/registry/reconciler/reconciler_test.go

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The catalog pod container now has a CPU limit of 2 cores. Reconciler fixtures update expected pod hashes and resource specifications for standard, legacy, extracted, cache, and restricted configurations.

Changes

Catalog Pod Resources

Layer / File(s) Summary
CPU limit and fixture validation
pkg/controller/registry/reconciler/reconciler.go, pkg/controller/registry/reconciler/reconciler_test.go
The catalog pod container now sets corev1.ResourceCPU to 2. Expected pod hashes and CPU limits are updated across all affected fixtures.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 691a1

The intended 2-core catalog pod CPU limit is reflected across the reconciler fixtures, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding CPU limits to CatalogSource pods.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 golangci-lint (2.13.2)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from kevinrizza and pedjak September 13, 2026 21:34
@openshift-ci

openshift-ci Bot commented Sep 13, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign pedjak for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@perdasilva

Copy link
Copy Markdown
Collaborator

Hey @ankitathomas could you please fix up the formatting of pkg/controller/registry/reconciler/reconciler.go

pkg/controller/registry/reconciler/reconciler.go:195:1  gofmt  File is not properly formatted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants