Skip to content

[bootbox] Add resources requests/limits to matchbox container - #2625

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
matthieu-robin:fix/matchbox-cpu-limit
Jul 3, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
cozystack:mainfrom
matthieu-robin:fix/matchbox-cpu-limit

Conversation

@matthieu-robin

@matthieu-robin Matthieu ROBIN (matthieu-robin) commented May 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The matchbox container in packages/extra/bootbox/templates/matchbox/deployment.yaml had no resources block, triggering a no CPU limit conformance warning on the bootbox-matchbox Deployment (PXE/iPXE provisioning service).

Bootbox is a standalone chart (no vendored upstream), so the values are set directly in the template — same pattern as #2614 (csi-resizer) and #2624 (s3manager).

  • limits : cpu: 200m, memory: 256Mi
  • requests : cpu: 50m, memory: 128Mi

Modest sizing since matchbox is a lightweight HTTP server serving iPXE profiles and boot assets from ConfigMaps.

Test plan

  • helm template bootbox . --namespace tenant-root --show-only templates/matchbox/deployment.yaml --set _namespace.host=example.com --set _cluster.solver=letsencrypt from packages/extra/bootbox/ renders the resources block on the matchbox container (verified locally)
  • Re-run the conformance/lint tool — the matchbox has no CPU limit warning should be gone
  • CI passes

Release note

```release-note
Add CPU and memory requests/limits to the matchbox container of the bootbox Deployment to clear the "no CPU limit" conformance warning.
```

Summary by CodeRabbit

  • Chores
    • Added Kubernetes resource limits and requests configuration to optimize container resource allocation and improve deployment stability.

Review Change Stack

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces explicit resource requests and limits to the matchbox container within the bootbox deployment. By defining these constraints, the change ensures the service adheres to cluster resource management standards and eliminates existing conformance warnings.

Highlights

  • Resource Constraints: Added CPU and memory requests and limits to the matchbox container to comply with cluster conformance policies.
  • Conformance Compliance: Resolved the 'no CPU limit' warning triggered by the bootbox-matchbox deployment.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment Gemini (@gemini-code-assist) Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions github-actions Bot added area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review size/XS This PR changes 0-9 lines, ignoring generated files labels May 12, 2026
@coderabbitai

coderabbitai Bot commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7a718fff-d55f-4ee5-814d-e6b632285b81

📥 Commits

Reviewing files that changed from the base of the PR and between f38a047 and 486742d.

📒 Files selected for processing (1)
  • packages/extra/bootbox/templates/matchbox/deployment.yaml

📝 Walkthrough

Walkthrough

This PR adds Kubernetes resource constraints to the matchbox container within the bootbox-matchbox Deployment. The container now declares CPU and memory limits as well as resource requests, ensuring predictable scheduling and preventing resource exhaustion on the cluster.

Changes

Matchbox Deployment Resource Constraints

Layer / File(s) Summary
Container resource limits and requests
packages/extra/bootbox/templates/matchbox/deployment.yaml
Matchbox container spec updated with a resources block specifying CPU/memory limits and requests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

A rabbit hops through configs neat,
Adding limits, making resources complete,
Matchbox breathes with bounds now set,
No runaway containers, no regret! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Kubernetes resource requests and limits to the matchbox container in the bootbox deployment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@dosubot dosubot Bot added area/extra Issues or PRs related to tenant-specific modules (packages/extra/) quality-of-life QoL improvements labels May 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds resource requests and limits to the matchbox deployment in the bootbox package. Feedback indicates that a securityContext should be added to the container for better security, and the commit metadata needs to be updated to follow the Conventional Commits format and include a sign-off trailer as per the repository guidelines.

- name: http
containerPort: 8080
protocol: TCP
resources:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The container is missing a securityContext. According to the repository guidelines (Line 82), containers should have a securityContext defined and should not run as root without a clear rationale. Adding a restricted security context improves the security posture of the workload.

        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
              - ALL
          runAsNonRoot: true
          seccompProfile:
            type: RuntimeDefault
        resources:
References
  1. Flag missing securityContext and containers running as root without an explicit reason. (link)

- name: http
containerPort: 8080
protocol: TCP
resources:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

The commit message and PR title do not follow the Conventional Commits format required by the repository guidelines (Line 36). It should follow the type(scope): description format (e.g., feat(bootbox): add resource requests/limits to matchbox). Additionally, ensure each commit includes a Signed-off-by: trailer.

References
  1. Each commit must follow Conventional Commits format and have a Signed-off-by: trailer. (link)

@lexfrei Aleksei Sviridkin (lexfrei) added kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt and removed area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review labels May 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward and correct. The resources block is indented as a sibling of ports on the matchbox container, and 200m/256Mi limits over 50m/128Mi requests fit a lightweight HTTP server that just serves iPXE profiles and boot assets from ConfigMaps. This is a template edit, not a values change, so the chart's values.schema.json is unaffected and no regeneration is needed. Sign-off present.

The matchbox Deployment in the bootbox package had no resources block,
triggering a 'no CPU limit' conformance warning. Set limits 200m/256Mi
and requests 50m/128Mi — modest sizing since matchbox is a lightweight
HTTP server serving iPXE profiles and boot assets from ConfigMaps.
Bootbox is a standalone chart (no vendored upstream), so the values
are set directly in the template, matching the existing pattern in
csi-resizer and s3manager.

Signed-off-by: Matthieu <[email protected]>
@github-actions github-actions Bot added the area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review label Jul 3, 2026
@lexfrei
Aleksei Sviridkin (lexfrei) merged commit 24e3bf9 into cozystack:main Jul 3, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extra Issues or PRs related to tenant-specific modules (packages/extra/) area/uncategorized PR auto-labeler could not map title scope to a known area/*; please review kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt quality-of-life QoL improvements size/XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants