Skip to content

Commit 2ba8cb2

Browse files
Reuse configured TopologySpreadConstraints for logical backup.
1 parent 2580759 commit 2ba8cb2

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
@@ -2360,6 +2360,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
23602360

23612361
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
23622362

2363+
topologySpreadConstraintsSpec := generateTopologySpreadConstraints(labels, spec.TopologySpreadConstraints)
2364+
23632365
// re-use the method that generates DB pod templates
23642366
if podTemplate, err = c.generatePodTemplate(
23652367
c.Namespace,
@@ -2369,7 +2371,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
23692371
[]v1.Container{},
23702372
[]v1.Container{},
23712373
util.False(),
2372-
[]v1.TopologySpreadConstraint{},
2374+
topologySpreadConstraintsSpec,
23732375
&tolerationsSpec,
23742376
nil,
23752377
nil,

0 commit comments

Comments
 (0)