Reuse configured TopologySpreadConstraints for logical backup.

This commit is contained in:
Trung Minh Lai 2025-03-08 13:10:22 +07:00 committed by laiminhtrung1997
parent ad4dd0098d
commit f52d9bc8fb
1 changed files with 3 additions and 1 deletions

View File

@ -2360,6 +2360,8 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
tolerationsSpec := tolerations(&spec.Tolerations, c.OpConfig.PodToleration)
topologySpreadConstraintsSpec := generateTopologySpreadConstraints(labels, spec.TopologySpreadConstraints)
// re-use the method that generates DB pod templates
if podTemplate, err = c.generatePodTemplate(
c.Namespace,
@ -2369,7 +2371,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
[]v1.Container{},
[]v1.Container{},
util.False(),
[]v1.TopologySpreadConstraint{},
topologySpreadConstraintsSpec,
&tolerationsSpec,
nil,
nil,