Skip to content

Commit

Permalink
chore: Add resources requests and limits
Browse files Browse the repository at this point in the history
Signed-off-by: kahirokunn <[email protected]>
  • Loading branch information
kahirokunn committed Feb 5, 2024
1 parent 55483a8 commit a6338f6
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 0 deletions.
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:
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

0 comments on commit a6338f6

Please sign in to comment.