-
Notifications
You must be signed in to change notification settings - Fork 66
Add container resource caps enforcement for workspace containers #1545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
Implements ContainerResourceCaps configuration to enforce maximum resource limits and requests for workspace containers. When configured, container resource requirements that exceed the caps will be limited to the maximum values. This feature does not apply to initContainers or projectClone containers. Changes include: - New ContainerResourceCaps field in DevWorkspaceOperatorConfig API - Updated CRDs with the new field definition - Controller integration to pass resource caps to container handlers - Resource capping logic in container, flatten, merge, and projects packages - Tests for resource cap enforcement Assisted-by: Claude. Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rohanKanojia, tolusha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Anatolii Bazko <[email protected]>
|
New changes are detected. LGTM label has been removed. |
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
|
@tolusha thank you for the PR, I noticed that if I set for example: And create a devworkspace with no cpu limits or requests: DevworkspaceThen it looks like the If I update the DWOC to set the cpu limit and request cap to I think the cap should not be applied to the cpu in both cases? |
What does this PR do?
Implements ContainerResourceCaps configuration to enforce maximum resource limits and requests for workspace containers. When configured, container resource requirements that exceed the caps will be limited to the maximum values. This feature does not apply to initContainers or projectClone containers.
Assisted-by: Claude.
What issues does this PR fix or reference?
https://issues.redhat.com/browse/CRW-9546
Is it tested? How?
Start a workspace from devifile
Check containers resources in a workspace deployment:
PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-pathto trigger)v8-devworkspace-operator-e2e: DevWorkspace e2e testv8-che-happy-path: Happy path for verification integration with Che