zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.33k stars 980 forks source link

Add NodeAffinity support to LogicalBackup Job #2157

Open kbanka opened 1 year ago

kbanka commented 1 year ago

Please, answer some short questions which should help us to understand your problem / question better?


There seems to be no way currently to specify NodeAffinity for logical backup job. According to generateLogicalBackupJob(), affinity is limited to predefined PodAffinity only. It would be nice to add PodAffinity support to backup job, just like it's possible to do for Postgres DB pods and Pooler (even if currently not working as desired - #1910 ).

novotnej commented 7 months ago

As far as I can tell, logicalbackup jobs inherit podAffinity from the general configKubernetes.node_readiness_label (which was the only way to have any podAffinity on the database pods at all). It does not, however, inherit the tolerations - which leads to situations where the DB pods are getting scheduled on dedicated, tainted nodes just fine, but backups fail to get scheduled entirely...