Skip to content

csv: add cpu, memory requests value for operator#1639

Merged
liranmauda merged 1 commit intonoobaa:masterfrom
Nikhil-Ladha:mem-reqs-limit
Jul 7, 2025
Merged

csv: add cpu, memory requests value for operator#1639
liranmauda merged 1 commit intonoobaa:masterfrom
Nikhil-Ladha:mem-reqs-limit

Conversation

@Nikhil-Ladha
Copy link
Contributor

@Nikhil-Ladha Nikhil-Ladha commented Jun 30, 2025

Add cpu, memory requests value for operator

Summary by CodeRabbit

  • Chores
    • Added default CPU and memory resource requests for the noobaa-operator container to ensure more predictable resource allocation during deployment.

@coderabbitai
Copy link

coderabbitai bot commented Jun 30, 2025

Walkthrough

Resource requests for CPU and memory have been added to the "noobaa-operator" container specification in the deployment manifest. The requests specify CPU as "100m" and memory as "256Mi", complementing the existing resource limits. The SHA256 checksum constant for the deployment manifest was updated accordingly. No other changes were made to the deployment configuration or code structure.

Changes

File(s) Change Summary
pkg/bundle/deploy.go Updated SHA256 checksum constant for operator deployment YAML; added CPU and memory resource requests to container spec.
deploy/operator.yaml Added CPU ("100m") and memory ("256Mi") resource requests to the "noobaa-operator" container specification.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DeploymentManifest
    participant K8sScheduler

    User->>DeploymentManifest: Define noobaa-operator container
    DeploymentManifest->>K8sScheduler: Specify resource requests (CPU: 100m, Memory: 256Mi)
    K8sScheduler-->>DeploymentManifest: Schedule pod based on requests and limits
Loading

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc3dc2a and de434ba.

📒 Files selected for processing (2)
  • deploy/operator.yaml (1 hunks)
  • pkg/bundle/deploy.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • deploy/operator.yaml
  • pkg/bundle/deploy.go
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Nikhil-Ladha
Copy link
Contributor Author

/cc @nimrod-becker @dannyzaken

@liranmauda
Copy link
Contributor

liranmauda commented Jul 1, 2025

Hi @Nikhil-Ladha

I am not reviewing the actual need for this. I will leave that to @dannyzaken and @nimrod-becker (and @jackyalbo )
But, the place to add this is not the deploy, the deploy is auto-generated when running:
make gen ; make gen-api ; make
In order to add those things, you will need to add them in the proper CR (in this case, operator deployment) and then run the command above to generate the deployment.

Moreover, you will probably need to bump noobaa on the ocs-operator to add this code. You might even need a PR to add this field to the storagecluster on the ocs-operator, to avoid a situation where an upgrade will revert those changes.

@Nikhil-Ladha
Copy link
Contributor Author

Hi @Nikhil-Ladha

I am not reviewing the actual need for this. I will leave that to @dannyzaken and @nimrod-becker (and @jackyalbo )

This change is coming as part of an ODF epic for an upcoming release, and the requests and limits value for each pod is a necessary change as per the new policies.

But, the place to add this is not the deploy, the deploy is auto-generated when running: make gen ; make gen-api ; make In order to add those things, you will need to add them in the proper CR (in this case, operator deployment) and then run the command above to generate the deployment.

Ack, thanks for the command. I have updated the PR now to add the values in the correct file and add the generated changes.

Moreover, you will probably need to bump noobaa on the ocs-operator to add this code. You might even need a PR to add this field to the storagecluster on the ocs-operator, to avoid a situation where an upgrade will revert those changes.

We don't need that as when the bundles are generated in the d/s scripts then it automatically updates the odf-operator bundle to deploy the latest noobaa-operator bundle, which will then deploy the CSV with the requests value set in them.

@dannyzaken
Copy link
Member

@Nikhil-Ladha Aproved. please rebase

@Nikhil-Ladha
Copy link
Contributor Author

@Nikhil-Ladha Aproved. please rebase

Thanks, done 👍🏼

@Nikhil-Ladha
Copy link
Contributor Author

The failed GH actions are due to some "payment issues" it seems 😅

add cpu, memory requests value for operator

Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
@Nikhil-Ladha
Copy link
Contributor Author

@dannyzaken can you please help with approving the CI and merging the PR, if everything looks good?

@liranmauda liranmauda merged commit dc12226 into noobaa:master Jul 7, 2025
16 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants