Skip to content
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

Allow configuring memory and CPU requests / limits #1343

Open
ibuziuk opened this issue Nov 6, 2024 · 2 comments
Open

Allow configuring memory and CPU requests / limits #1343

ibuziuk opened this issue Nov 6, 2024 · 2 comments
Assignees

Comments

@ibuziuk
Copy link
Contributor

ibuziuk commented Nov 6, 2024

Description

Currently, it is not possible to configure memory and CPU for DWO pod. The only workaround is patching CSV directly, but since the CSV gets replaced as part of an upgrade, the modified value gets reverted to the older default values e.g. for devworkspace-controller-manager

              spec:
                containers:
                  - resources:
                      limits:
                        cpu: '3'
                        memory: 3Gi
                      requests:
                        cpu: 250m
                        memory: 100Mi

Additional context

Need to investigate if we can propagate RAM / CPU configuration from the subscription directly and if it is a good approach in general - https://developers.redhat.com/articles/2023/03/06/5-global-environment-variables-provided-openshift-gitops#

More details https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/subscription-config.md

@ibuziuk ibuziuk changed the title Allow configuring memory and CPU request / limits Allow configuring memory and CPU requests / limits Nov 6, 2024
@ibuziuk
Copy link
Contributor Author

ibuziuk commented Nov 6, 2024

@dkwon17 @AObuchow please, review

@dkwon17
Copy link
Collaborator

dkwon17 commented Nov 28, 2024

As discussed, it's possible to set the memory and CPU limits of the DWO pod in the Subscription: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/subscription-config.md

Example:

spec:
  channel: fast
  installPlanApproval: Automatic
  name: devworkspace-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
  startingCSV: devworkspace-operator.v0.31.1
  config:
    resources:
      limits:
        memory: "4Gi"

However, the resource limits are applied to all containers (2) in the pod, and not just the devworkspace-controller container. Since there are two containers (devworkspace-controller and kube-rbac-proxy), the total memory limit for the configuration above is 8Gi

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

No branches or pull requests

2 participants