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:
parent
13d6594cdf
commit
843d3e1caa
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue