Skip to content

Commit 95412eb

Browse files
Reuse configured TopologySpreadConstraints for logical backup.
1 parent 9d87d0d commit 95412eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/cluster/k8sres.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2357,6 +2357,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
23572357

23582358
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
23592359

2360+
topologySpreadConstraintsSpec := generateTopologySpreadConstraints(labels, spec.TopologySpreadConstraints)
2361+
23602362
// re-use the method that generates DB pod templates
23612363
if podTemplate, err = c.generatePodTemplate(
23622364
c.Namespace,
@@ -2366,7 +2368,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
23662368
[]v1.Container{},
23672369
[]v1.Container{},
23682370
util.False(),
2369-
[]v1.TopologySpreadConstraint{},
2371+
topologySpreadConstraintsSpec,
23702372
&tolerationsSpec,
23712373
nil,
23722374
nil,

0 commit comments

Comments
 (0)