Add NodeAffinity support to LogicalBackup Job
Please, answer some short questions which should help us to understand your problem / question better?
- Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.7.1
- Where do you run it - cloud or metal? Kubernetes or OpenShift? AWS K8s
- Are you running Postgres Operator in production? yes
- Type of issue? feature request
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 ).
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...