Skip to content

Commit 843d3e1

Browse files
duckhawkFxKu
andauthored
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>
1 parent 13d6594 commit 843d3e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/cluster/k8sres.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2242,6 +2242,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
22422242
resourceRequirements *v1.ResourceRequirements
22432243
)
22442244

2245+
spec := &c.Spec
2246+
22452247
// NB: a cron job creates standard batch jobs according to schedule; these batch jobs manage pods and clean-up
22462248

22472249
c.logger.Debug("Generating logical backup pod template")
@@ -2291,6 +2293,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
22912293

22922294
annotations := c.generatePodAnnotations(&c.Spec)
22932295

2296+
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
2297+
22942298
// re-use the method that generates DB pod templates
22952299
if podTemplate, err = c.generatePodTemplate(
22962300
c.Namespace,
@@ -2300,7 +2304,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
23002304
[]v1.Container{},
23012305
[]v1.Container{},
23022306
util.False(),
2303-
&[]v1.Toleration{},
2307+
&tolerationsSpec,
23042308
nil,
23052309
nil,
23062310
nil,

0 commit comments

Comments
 (0)