charts icon indicating copy to clipboard operation
charts copied to clipboard

[bitnami/postgresql] Add affinity for backup cronjob

Open runalsh opened this issue 6 months ago • 0 comments

Description of the change

If the Kubernetes cluster is multi-node and does not support mounting ReadWriteMany volumes, the backup job for PostgreSQL may fail to mount the volume because it is located on a different node than the one where the CronJob is running. In this case, the job remains stuck in the ContainerCreating status. This PR proposes adding an affinity block, allowing users to define placement rules for the job. For example, they can bind it to the primary pod using podAffinity, similar to how it is implemented for the primary.

Benefits

The user can manually set nodeAffinity and podAffinity to schedule the execution of the backup job.

Possible drawbacks

None

Applicable issues

None

Additional information

N/A

Checklist

  • [x] Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • [X] Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • [X] Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • [X] All commits signed off and in agreement of Developer Certificate of Origin (DCO)

runalsh avatar Aug 16 '24 16:08 runalsh