Fix logical backup job toleration (#2018)

* Fix logical backup job toleration (now cluster and operator-wide instructions will be not ignored)

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
This commit is contained in:
Vasily Oleynikov 2024-05-17 15:45:21 +03:00 committed by GitHub
parent 13d6594cdf
commit 843d3e1caa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -2242,6 +2242,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
resourceRequirements *v1.ResourceRequirements
)
spec := &c.Spec
// NB: a cron job creates standard batch jobs according to schedule; these batch jobs manage pods and clean-up
c.logger.Debug("Generating logical backup pod template")
@ -2291,6 +2293,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
annotations := c.generatePodAnnotations(&c.Spec)
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
// re-use the method that generates DB pod templates
if podTemplate, err = c.generatePodTemplate(
c.Namespace,
@ -2300,7 +2304,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
[]v1.Container{},
[]v1.Container{},
util.False(),
&[]v1.Toleration{},
&tolerationsSpec,
nil,
nil,
nil,