Reuse configured TopologySpreadConstraints for logical backup.
This commit is contained in:
parent
ad4dd0098d
commit
f52d9bc8fb
|
|
@ -2360,6 +2360,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
|
||||||
|
|
||||||
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
|
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
|
||||||
|
|
||||||
|
topologySpreadConstraintsSpec := generateTopologySpreadConstraints(labels, spec.TopologySpreadConstraints)
|
||||||
|
|
||||||
// re-use the method that generates DB pod templates
|
// re-use the method that generates DB pod templates
|
||||||
if podTemplate, err = c.generatePodTemplate(
|
if podTemplate, err = c.generatePodTemplate(
|
||||||
c.Namespace,
|
c.Namespace,
|
||||||
|
|
@ -2369,7 +2371,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
|
||||||
[]v1.Container{},
|
[]v1.Container{},
|
||||||
[]v1.Container{},
|
[]v1.Container{},
|
||||||
util.False(),
|
util.False(),
|
||||||
[]v1.TopologySpreadConstraint{},
|
topologySpreadConstraintsSpec,
|
||||||
&tolerationsSpec,
|
&tolerationsSpec,
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue