# Percona PostgreSQL Operator does not adopt resource bounds set in PerconaPGCluster yaml file

**URL:** https://forums.percona.com/t/percona-postgresql-operator-does-not-adopt-resource-bounds-set-in-perconapgcluster-yaml-file/29662
**Category:** Percona Operator for PostgreSQL
**Created:** [April 11, 2024, 8:38am UTC](https://forums.percona.com/t/percona-postgresql-operator-does-not-adopt-resource-bounds-set-in-perconapgcluster-yaml-file/29662 "2024-04-11T08:38:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ma\_G](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ma_g/32/12537_2.png) [@Ma\_G](https://forums.percona.com/u/Ma_G)
#### Post date: [April 11, 2024, 8:38am UTC](https://forums.percona.com/t/percona-postgresql-operator-does-not-adopt-resource-bounds-set-in-perconapgcluster-yaml-file/29662/1 "2024-04-11T08:38:03Z")

</div>

## Description:

Hi all,

I have set up a PostgreSQL cluster on OpenShift using Percona PostgreSQL Operator 2.3.2. I am limited regarding computing resources, which is why I have specified the following in the PerconaPGCluster yaml file:

instances:  
- affinity:  
podAntiAffinity:  
preferredDuringSchedulingIgnoredDuringExecution:  
- podAffinityTerm:  
labelSelector:  
matchLabels:  
[postgres-operator.crunchydata.com/data:](http://postgres-operator.crunchydata.com/data:) postgres  
topologyKey: [kubernetes.io/hostname](http://kubernetes.io/hostname)  
weight: 1  
dataVolumeClaimSpec:  
accessModes:  
- ReadWriteOnce  
resources:  
requests:  
storage: 1Gi  
name: instance1  
replicas: 3  
resources:  
limits:  
cpu: 1  
memory: 500Mi  
requests:  
cpu: 500m  
memory: 500Mi  
postgresVersion: 16

However, if I click on “Events” in the OpenShift GUI I get the following error message:

create Pod \<pod\_name\> in StatefulSet \<statefulset\_name\> failed error: pods “\<pod\_name\>” is forbidden: exceeded quota: \<quota\_name\>, requested: limits.memory=2750Mi,requests.memory=2750Mi, used: limits.memory=8114Mi,requests.memory=7066Mi, limited: limits.memory=8Gi,requests.memory=8Gi

My question is: Why is the Operator not using the lower limits I have specified?

---

<div class="post-metadata">

### Author: ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)
#### Post date: [April 15, 2024, 7:47am UTC](https://forums.percona.com/t/percona-postgresql-operator-does-not-adopt-resource-bounds-set-in-perconapgcluster-yaml-file/29662/2 "2024-04-15T07:47:43Z")

</div>

Hello @Ma_G ,

I can’t reproduce it.

Could you please run the following:

1. `oc get pg -o yaml` and check if the requests and limits are applied there
2. `oc get sts -o yaml` and check the same?

---

<div class="post-metadata">

### Author: ![Ma\_G](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ma_g/32/12537_2.png) [@Ma\_G](https://forums.percona.com/u/Ma_G)
#### Post date: [April 18, 2024, 2:42pm UTC](https://forums.percona.com/t/percona-postgresql-operator-does-not-adopt-resource-bounds-set-in-perconapgcluster-yaml-file/29662/3 "2024-04-18T14:42:17Z")

</div>

Hello again.

Yes, the limits are in the pg.yaml as well as in the sts.yaml.

---

<div class="post-metadata">

### Author: ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)
#### Post date: [April 25, 2024, 3:47pm UTC](https://forums.percona.com/t/percona-postgresql-operator-does-not-adopt-resource-bounds-set-in-perconapgcluster-yaml-file/29662/4 "2024-04-25T15:47:20Z")

</div>

Can you please book me here: [Zoom Scheduler](https://scheduler.zoom.us/percona-sergey-pronin/30-mins)

I would be glad to jump into a call to discuss it.
