Skip to content

Commit

Permalink
fix(upgrade): fix backup backupTargetName label not set
Browse files Browse the repository at this point in the history
Longhorn 10032

Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Dec 22, 2024
1 parent e938d31 commit 0f504fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upgrade/v17xto180/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ func upgradeBackups(namespace string, lhClient *lhclientset.Clientset, resourceM
return errors.Wrapf(err, "failed to get volume %v of backup %v", b.Status.VolumeName, b.Name)
}
} else {
backupTargetName = vol.Spec.BackupTargetName
if vol.Spec.BackupTargetName != "" {
backupTargetName = vol.Spec.BackupTargetName
}
}
b.Labels = addLabel(b.Labels, types.LonghornLabelBackupTarget, backupTargetName)
}
Expand Down

0 comments on commit 0f504fe

Please sign in to comment.