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

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: postgres
topologyKey: 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?

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?

Hello again.

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

Can you please book me here: Zoom Scheduler

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