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

OCPBUGS-13830: Add support for overriding container resources #136

Merged
merged 3 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,10 @@ spec:
image: openshift.io/cert-manager-operator:latest
imagePullPolicy: Always
name: cert-manager-operator
resources: {}
resources:
Copy link
Member

Choose a reason for hiding this comment

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

IIUC, by default the operator would end up adding resources.requests with CPU 10m and 32Mi RAM, but no resources.limits for now.

Copy link
Member

Choose a reason for hiding this comment

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

Just noting to myself.

Copy link
Member

Choose a reason for hiding this comment

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

Is the operator container resource requests/limits customizable in any way?
We're setting it to these values here in the CSV which is a default. Asking this because, the original bug report is also about the operator resources and not just for operand.

Copy link
Contributor

Choose a reason for hiding this comment

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

We are only setting the requests so should be ok, but yes limits need to be customizable. Can be done using subscription.spec.config so not an issue.

Copy link
Member

@swghosh swghosh Aug 2, 2023

Choose a reason for hiding this comment

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

Ok, we need to document it later (like we did for logLevels).
+doc-req, cc: @xenolinux

requests:
cpu: 10m
memory: 32Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ spec:
runAsNonRoot: true
seccompProfile:
type: 'RuntimeDefault'
resources:
requests:
cpu: 10m
memory: 32Mi
serviceAccountName: controller-manager
terminationGracePeriodSeconds: 10