Skip to content

fix(config): bump default persistent home init container memory limit…#1644

Open
btjd wants to merge 1 commit into
devfile:mainfrom
btjd:CRW-10734
Open

fix(config): bump default persistent home init container memory limit…#1644
btjd wants to merge 1 commit into
devfile:mainfrom
btjd:CRW-10734

Conversation

@btjd

@btjd btjd commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR addresses issue CRW-10734 by increasing the default memory allocations assigned to the init-persistent-home container.

The previous default threshold of 128Mi was causing transient Out-Of-Memory (OOM) faults (Exit Code 137) during initialization when deploying workspaces utilizing heavy developer images (such as the Universal Developer Image), due to the volume of file-stowing operations. Right-sizing the fallback bounds prevents container termination while preserving user override flexibility via custom operator configs.

Technical Changes

  • Updated pkg/config/defaults.go to shift default init-persistent-home resource settings to 256Mi (limit) and 128Mi (request).
  • Generated updated structural deepcopy and manifest CRD assets (make generate).

Validation Performed

  • Verified local standalone operator validation execution lifecycle.
  • Tested Scenario A: Confirmed clean baseline generation (256Mi memory bounds injected, execution completed with Exit Code 0).
  • Tested Scenario B: Verified manual cluster configuration properties inside DevWorkspaceOperatorConfig supersede defaults without regression.

AI Assistance Disclosure

  • Assisted-by: Claude
  • Details: AI was utilized for execution log analytics, local target pathway troubleshooting, and runtime cluster validation workflows. The baseline source code modifications consist strictly of configuration constant updates.

Summary by CodeRabbit

  • Configuration Updates
    • Increased default container memory resources: limit now 256Mi (previously 128Mi) and request now 128Mi (previously 64Mi)

…s to 256Mi

Signed-off-by: Badre Tejado-Imam <btejado@redhat.com>
@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: btjd
Once this PR has been reviewed and has the lgtm label, please assign dkwon17 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

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR increases the default container memory resources for DevWorkspace operators from 128Mi/64Mi (limit/request) to 256Mi/128Mi. The change updates the configuration defaults, API type documentation, and CRD schema description to reflect the new values.

Changes

Default Memory Resources

Layer / File(s) Summary
Core default memory values
pkg/config/defaults.go
Increased DefaultContainerResources.Limits memory from 128Mi to 256Mi and Requests memory from 64Mi to 128Mi.
Documentation and CRD schema
apis/controller/v1alpha1/devworkspaceoperatorconfig_types.go, deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml
Updated inline type documentation comment and CRD schema field description to document the new default memory limit and request values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit's rhyme for cleaner defaults:
Memory doubled, resources aligned,
Configuration and schemas refined,
256Mi now holds the weight,
Containers thrive at their rightful fate! 🌟

🚥 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 reflects the primary change: bumping default memory limits for the init container from 128Mi to 256Mi. It directly correlates with all modified files (defaults.go, CRD, documentation, and generated assets).
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.

@tolusha

tolusha commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm che-ai-assistant — I help with your pull requests.

Available commands:

  • /che-ai-assistant generate-che-doc — Generate a documentation PR based on this PR's changes
  • /che-ai-assistant ok-pr-review — Run a comprehensive PR review (summary, code review, deep review, impact analysis)
  • /che-ai-assistant help — Show this help message

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
pkg/config/defaults.go (2)

2-2: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update copyright year to 2026 in pkg/config/defaults.go and apis/controller/v1alpha1/devworkspaceoperatorconfig_types.go.

Both files show copyright year 2025 in their headers, but the current year is 2026. As per coding guidelines, all Go source files must start with the copyright header format: // Copyright (c) 2019-2026 Red Hat, Inc. The same one-line fix applies to both files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/config/defaults.go` at line 2, Replace the outdated header line "//
Copyright (c) 2019-2025 Red Hat, Inc." with "// Copyright (c) 2019-2026 Red Hat,
Inc." in both files that show this header (identify by that exact header string)
so the file headers in pkg/config/defaults.go and
apis/controller/v1alpha1/devworkspaceoperatorconfig_types.go are updated to
2026.

Source: Coding guidelines


18-27: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Reorganize imports to follow project conventions.

The imports are not organized according to the coding guidelines. As per coding guidelines, imports should be organized into three groups separated by blank lines: (1) standard library, (2) third-party + Kubernetes, (3) project-local. Currently, the project-local imports appear before the Kubernetes packages.

♻️ Proposed fix - Run 'make fmt' to automatically fix
 import (
 	"fmt"
 
-	"github.com/devfile/devworkspace-operator/apis/controller/v1alpha1"
-	"github.com/devfile/devworkspace-operator/pkg/infrastructure"
 	appsv1 "k8s.io/api/apps/v1"
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/resource"
 	"k8s.io/utils/pointer"
+
+	"github.com/devfile/devworkspace-operator/apis/controller/v1alpha1"
+	"github.com/devfile/devworkspace-operator/pkg/infrastructure"
 )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/config/defaults.go` around lines 18 - 27, Reorder the import block in
pkg/config/defaults.go into three groups separated by blank lines—first standard
library (fmt), then third-party/Kubernetes packages (k8s.io/* and
k8s.io/utils/pointer), and finally project-local imports
(github.com/devfile/devworkspace-operator/... and
github.com/devfile/devworkspace-operator/pkg/infrastructure); ensure imports for
appsv1, corev1, and k8s resource/pointer are in the Kubernetes group and
devworkspace/infrastructure are in the project-local group, then run the
repository formatter (make fmt) to apply the style automatically.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml`:
- Line 544: The generated CRD artifact is out of sync with the updated template:
update the default memory description from "128Mi/64Mi" to "256Mi/128Mi" in the
deployed CRD by regenerating the CRD objects from the source template
(controller.devfile.io_devworkspaceoperatorconfigs.yaml) and committing the
updated
devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml;
run the project’s CRD generation/make target (or the generator script used by
the repo), verify the memory default strings now read "256Mi" (limit) and
"128Mi" (request) in the generated CRD, and commit the regenerated file so both
files advertise the same defaults.

---

Outside diff comments:
In `@pkg/config/defaults.go`:
- Line 2: Replace the outdated header line "// Copyright (c) 2019-2025 Red Hat,
Inc." with "// Copyright (c) 2019-2026 Red Hat, Inc." in both files that show
this header (identify by that exact header string) so the file headers in
pkg/config/defaults.go and
apis/controller/v1alpha1/devworkspaceoperatorconfig_types.go are updated to
2026.
- Around line 18-27: Reorder the import block in pkg/config/defaults.go into
three groups separated by blank lines—first standard library (fmt), then
third-party/Kubernetes packages (k8s.io/* and k8s.io/utils/pointer), and finally
project-local imports (github.com/devfile/devworkspace-operator/... and
github.com/devfile/devworkspace-operator/pkg/infrastructure); ensure imports for
appsv1, corev1, and k8s resource/pointer are in the Kubernetes group and
devworkspace/infrastructure are in the project-local group, then run the
repository formatter (make fmt) to apply the style automatically.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3953d8f2-a3f0-4068-a305-4777b6d82c96

📥 Commits

Reviewing files that changed from the base of the PR and between 7b6ff69 and 2df07fa.

📒 Files selected for processing (4)
  • apis/controller/v1alpha1/devworkspaceoperatorconfig_types.go
  • apis/controller/v1alpha1/zz_generated.deepcopy.go
  • deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml
  • pkg/config/defaults.go

DefaultContainerResources defines the resource requirements (memory/cpu limit/request) used for
container components that do not define limits or requests. In order to not set a field by default,
the value "0" should be used. By default, the memory limit is 128Mi and the memory request is 64Mi.
the value "0" should be used. By default, the memory limit is 256Mi and the memory request is 128Mi.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Sync generated CRD artifact with this updated default description.

This template now documents 256Mi/128Mi, but the generated artifact at deploy/deployment/kubernetes/objects/devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml (Lines 542-547 in the provided snippet) still documents 128Mi/64Mi. That mismatch creates a cross-file CRD contract/docs drift for consumers using the deployment artifact.

Please regenerate and commit the deployment CRD objects so both sources advertise the same defaults.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@deploy/templates/crd/bases/controller.devfile.io_devworkspaceoperatorconfigs.yaml`
at line 544, The generated CRD artifact is out of sync with the updated
template: update the default memory description from "128Mi/64Mi" to
"256Mi/128Mi" in the deployed CRD by regenerating the CRD objects from the
source template (controller.devfile.io_devworkspaceoperatorconfigs.yaml) and
committing the updated
devworkspaceoperatorconfigs.controller.devfile.io.CustomResourceDefinition.yaml;
run the project’s CRD generation/make target (or the generator script used by
the repo), verify the memory default strings now read "256Mi" (limit) and
"128Mi" (request) in the generated CRD, and commit the regenerated file so both
files advertise the same defaults.

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

@btjd: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v14-che-happy-path 2df07fa link true /test v14-che-happy-path

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

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