diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index b60c4ecb3..3698c56e6 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -2210,6 +2210,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") @@ -2259,6 +2261,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, @@ -2268,7 +2272,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) { []v1.Container{}, []v1.Container{}, util.False(), - &[]v1.Toleration{}, + &tolerationsSpec, nil, nil, nil,