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

chore: Add resources requests and limits #1571

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config/charts/knative-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6245,5 +6245,12 @@ spec:
ports:
- name: metrics
containerPort: 9090
resources:
Copy link
Member

Choose a reason for hiding this comment

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

Do these numbers come from any verification or such?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I have verified this in my environment on a metrics basis and it works well with this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it's not a problem, I'll try to fix the unit test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matzew Your opinion.
Does it seem safe to proceed with implementation?
Thx.

requests:
memory: 32Mi
cpu: 20m
limits:
memory: 100Mi
cpu: 50m

---
7 changes: 7 additions & 0 deletions config/manager/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@ spec:
ports:
- name: metrics
containerPort: 9090
resources:
requests:
memory: 32Mi
cpu: 20m
limits:
memory: 100Mi
cpu: 50m
7 changes: 7 additions & 0 deletions pkg/reconciler/common/testdata/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,13 @@ spec:
containerPort: 8443
- name: another
image: gcr.io/knative-releases/knative.dev/serving/cmd/webhook@sha256:d33d129262f03921715c0f2e4cc4fae7b626438c907047df60e0f0f41688fbc2
resources:
requests:
memory: 32Mi
cpu: 20m
limits:
memory: 100Mi
cpu: 50m
---
apiVersion: v1
kind: Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ spec:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
env:
- name: SYSTEM_NAMESPACE
valueFrom:
Expand Down Expand Up @@ -635,6 +638,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
ports:
- containerPort: 9090
name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,13 @@ spec:
value: knative.dev/eventing
- name: WEBHOOK_NAME
value: github-webhook
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
ports:
- containerPort: 9090
name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,15 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
requests:
# taken from serving.
cpu: 20m
memory: 20Mi
limits:
# taken from serving.
cpu: 200m
memory: 200Mi
ports:
- containerPort: 9090
name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ spec:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
env:
- name: SYSTEM_NAMESPACE
valueFrom:
Expand Down Expand Up @@ -635,6 +638,15 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
requests:
# taken from serving.
cpu: 20m
memory: 20Mi
limits:
# taken from serving.
cpu: 200m
memory: 200Mi
ports:
- containerPort: 9090
name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,15 @@ spec:
value: knative.dev/eventing
- name: WEBHOOK_NAME
value: github-webhook
resources:
requests:
# taken from serving.
cpu: 20m
memory: 20Mi
limits:
# taken from serving.
cpu: 200m
memory: 200Mi
ports:
- containerPort: 9090
name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,15 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
requests:
# taken from serving.
cpu: 20m
memory: 20Mi
limits:
# taken from serving.
cpu: 200m
memory: 200Mi
ports:
- containerPort: 9090
name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ spec:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
env:
- name: SYSTEM_NAMESPACE
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,15 @@ spec:
value: knative.dev/eventing
- name: WEBHOOK_NAME
value: github-webhook
resources:
requests:
# taken from serving.
cpu: 20m
memory: 20Mi
limits:
# taken from serving.
cpu: 200m
memory: 200Mi
ports:
- containerPort: 9090
name: metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
resources:
requests:
memory: 32Mi
cpu: 20m
limits:
memory: 100Mi
cpu: 50m
ports:
- containerPort: 9090
name: metrics
Expand Down
Loading