Skip to content

Commit 7812e9d

Browse files
Increase cpu limits for postgres (#636)
Increase cpu limits for postgres If we don't set cpu limits they are being set by default (500m) but this value is too low for some of our pods. Keep cpu limits. Increase postgres cpu limit. Reviewed-by: Laura Barcziová
2 parents 442eb44 + 972d20a commit 7812e9d

20 files changed

+28
-8
lines changed

openshift/dashboard.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ spec:
4848
cpu: "5m"
4949
limits:
5050
memory: "256Mi"
51+
cpu: "50m"
5152
volumes:
5253
- name: packit-secrets
5354
secret:

openshift/flower.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ spec:
4040
cpu: "5m"
4141
limits:
4242
memory: "128Mi"
43+
cpu: "50m"
4344
replicas: 1
4445
strategy:
4546
type: Recreate

openshift/nginx.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ spec:
5959
cpu: "5m"
6060
limits:
6161
memory: "32Mi"
62+
cpu: "10m"
6263
replicas: 1
6364
strategy:
6465
type: Recreate

openshift/packit-service-beat.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ spec:
7979
ephemeral-storage: "80Ki"
8080
limits:
8181
memory: "256Mi"
82+
cpu: "50m"
8283
replicas: 1
8384
strategy:
8485
type: Recreate

openshift/packit-service-fedmsg.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ spec:
5555
cpu: "5m"
5656
limits:
5757
memory: "128Mi"
58+
cpu: "50m"
5859
livenessProbe:
5960
exec:
6061
command:

openshift/packit-service.yml.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ spec:
104104
# you have to temporarily increase (in webUI/console) the limit
105105
# and once the alembic upgrade passes, revert.
106106
memory: "{{ '4Gi' if project == 'packit--prod' else '512Mi' }}"
107+
cpu: "200m"
107108
# In TLS world, hostname needs to match whatever is set in the cert
108109
# in our cause, k8s is doing here something like curl https://172.15.2.4:8443/api/healthz/
109110
# which will fail TLS validation.
@@ -142,7 +143,7 @@ spec:
142143
readOnly: true
143144
resources:
144145
requests: {memory: "128Mi", cpu: "10m"}
145-
limits: {memory: "128Mi"}
146+
limits: {memory: "128Mi", cpu: "100m"}
146147
{% endif %}
147148
---
148149
apiVersion: v1

openshift/packit-worker.yml.j2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ spec:
2424
component: {{ component }}
2525
serviceName: "{{ component }}"
2626
replicas: {{ worker_replicas }}
27-
volumeClaimTemplates:
2827
{% if with_repository_cache and 'long-running' in queues %}
28+
volumeClaimTemplates:
2929
- metadata:
3030
name: packit-worker-repository-cache
3131
{% if managed_platform %}
@@ -94,7 +94,7 @@ spec:
9494
- name: DEPLOYMENT
9595
value: {{ deployment }}
9696
- name: DISTGIT_URL
97-
value: {{ distgit_url }}
97+
value: "{{ distgit_url }}"
9898
- name: DISTGIT_NAMESPACE
9999
value: {{ distgit_namespace }}
100100
{% if sourcegit_namespace %}
@@ -166,6 +166,7 @@ spec:
166166
cpu: {{ worker_requests_cpu }}
167167
limits:
168168
memory: {{ worker_limits_memory }}
169+
cpu: {{ worker_limits_cpu }}
169170
livenessProbe:
170171
exec:
171172
command:
@@ -196,7 +197,7 @@ spec:
196197
readOnly: true
197198
resources:
198199
requests: {memory: "128Mi", cpu: "10m"}
199-
limits: {memory: "128Mi"}
200+
limits: {memory: "128Mi", cpu: "100m"}
200201
{% endif %}
201202
---
202203
kind: ImageStream

openshift/postgres.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ spec:
7171
# based on this limit, so keep the limit reasonably high.
7272
memory: "{{ '4Gi' if project == 'packit--prod' else '512Mi' }}"
7373
# Not utilized most of the time, but useful during migrations and for some queries
74+
cpu: "2"
7475
volumeMounts:
7576
- name: postgres-data
7677
mountPath: /var/lib/pgsql/data

openshift/pushgateway.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ spec:
4242
cpu: "5m"
4343
limits:
4444
memory: "32Mi"
45+
cpu: "50m"
4546
replicas: 1
4647
strategy:
4748
type: Recreate

openshift/redict.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ spec:
4343
cpu: "10m"
4444
limits:
4545
memory: "256Mi"
46+
cpu: "10m"
4647
volumes:
4748
- name: redict-pv
4849
persistentVolumeClaim:

0 commit comments

Comments
 (0)